Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/devdrv.c

    r9d58539 r56fd7cf  
    7474        return ddf_driver_main(&generic_driver);
    7575}
    76 /*----------------------------------------------------------------------------*/
     76
    7777/** Count number of pipes the driver expects.
    7878 *
     
    8787        return count;
    8888}
    89 /*----------------------------------------------------------------------------*/
     89
    9090/** Callback when a new device is supposed to be controlled by this driver.
    9191 *
     
    105105        if (dev == NULL) {
    106106                usb_log_error("USB device `%s' structure allocation failed.\n",
    107                     gen_dev->name);
     107                    ddf_dev_get_name(gen_dev));
    108108                return ENOMEM;
    109109        }
     
    114114        if (rc != EOK) {
    115115                usb_log_error("USB device `%s' init failed (%s): %s.\n",
    116                     gen_dev->name, err_msg, str_error(rc));
     116                    ddf_dev_get_name(gen_dev), err_msg, str_error(rc));
    117117                return rc;
    118118        }
     
    124124        return rc;
    125125}
    126 /*----------------------------------------------------------------------------*/
     126
    127127/** Callback when a device is supposed to be removed from the system.
    128128 *
     
    139139                return ENOTSUP;
    140140        /* Just tell the driver to stop whatever it is doing */
    141         usb_device_t *usb_dev = gen_dev->driver_data;
     141        usb_device_t *usb_dev = ddf_dev_data_get(gen_dev);
    142142        const int ret = driver->ops->device_rem(usb_dev);
    143143        if (ret != EOK)
     
    146146        return EOK;
    147147}
    148 /*----------------------------------------------------------------------------*/
     148
    149149/** Callback when a device was removed from the system.
    150150 *
     
    160160        if (driver->ops->device_gone == NULL)
    161161                return ENOTSUP;
    162         usb_device_t *usb_dev = gen_dev->driver_data;
     162        usb_device_t *usb_dev = ddf_dev_data_get(gen_dev);
    163163        const int ret = driver->ops->device_gone(usb_dev);
    164164        if (ret == EOK)
     
    167167        return ret;
    168168}
    169 /*----------------------------------------------------------------------------*/
     169
    170170/** Destroy existing pipes of a USB device.
    171171 *
     
    178178        dev->pipes_count = 0;
    179179}
    180 /*----------------------------------------------------------------------------*/
     180
    181181/** Change interface setting of a device.
    182182 * This function selects new alternate setting of an interface by issuing
     
    415415        usb_address_t address;
    416416
    417         int rc = usb_get_info_by_handle(ddf_dev->handle,
     417        int rc = usb_get_info_by_handle(ddf_dev_get_handle(ddf_dev),
    418418            &hc_handle, &address, &usb_dev->interface_no);
    419419        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.