Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 56fd7cf in mainline for uspace/lib/usbdev/src/devdrv.c


Ignore:
Timestamp:
2012-08-17T11:37:03Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
1d5a540
Parents:
be2a38ad
Message:

Make ddf_dev_t and ddf_fun_t opaque. This further tighthens the DDF interface.

File:
1 edited

Legend:

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

    rbe2a38ad r56fd7cf  
    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        }
     
    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)
     
    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)
     
    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.