Changes in uspace/lib/usbdev/src/devdrv.c [9d58539:56fd7cf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/devdrv.c
r9d58539 r56fd7cf 74 74 return ddf_driver_main(&generic_driver); 75 75 } 76 /*----------------------------------------------------------------------------*/ 76 77 77 /** Count number of pipes the driver expects. 78 78 * … … 87 87 return count; 88 88 } 89 /*----------------------------------------------------------------------------*/ 89 90 90 /** Callback when a new device is supposed to be controlled by this driver. 91 91 * … … 105 105 if (dev == NULL) { 106 106 usb_log_error("USB device `%s' structure allocation failed.\n", 107 gen_dev->name);107 ddf_dev_get_name(gen_dev)); 108 108 return ENOMEM; 109 109 } … … 114 114 if (rc != EOK) { 115 115 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)); 117 117 return rc; 118 118 } … … 124 124 return rc; 125 125 } 126 /*----------------------------------------------------------------------------*/ 126 127 127 /** Callback when a device is supposed to be removed from the system. 128 128 * … … 139 139 return ENOTSUP; 140 140 /* 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); 142 142 const int ret = driver->ops->device_rem(usb_dev); 143 143 if (ret != EOK) … … 146 146 return EOK; 147 147 } 148 /*----------------------------------------------------------------------------*/ 148 149 149 /** Callback when a device was removed from the system. 150 150 * … … 160 160 if (driver->ops->device_gone == NULL) 161 161 return ENOTSUP; 162 usb_device_t *usb_dev = gen_dev->driver_data;162 usb_device_t *usb_dev = ddf_dev_data_get(gen_dev); 163 163 const int ret = driver->ops->device_gone(usb_dev); 164 164 if (ret == EOK) … … 167 167 return ret; 168 168 } 169 /*----------------------------------------------------------------------------*/ 169 170 170 /** Destroy existing pipes of a USB device. 171 171 * … … 178 178 dev->pipes_count = 0; 179 179 } 180 /*----------------------------------------------------------------------------*/ 180 181 181 /** Change interface setting of a device. 182 182 * This function selects new alternate setting of an interface by issuing … … 415 415 usb_address_t address; 416 416 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), 418 418 &hc_handle, &address, &usb_dev->interface_no); 419 419 if (rc != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.