Changeset 98604cc in mainline
- Timestamp:
- 2011-10-14T16:22:07Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 68dbe3e
- Parents:
- f2964e45
- Location:
- uspace/drv/bus/usb/usbhid
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhid/main.c
rf2964e45 r98604cc 95 95 usb_hid_destroy(hid_dev); 96 96 return rc; 97 } 97 } 98 98 99 99 usb_log_debug("USB/HID device structure initialized.\n"); … … 130 130 usb_log_error("Failed to start polling fibril for `%s'.\n", 131 131 dev->ddf_dev->name); 132 usb_hid_destroy(hid_dev); 132 133 return rc; 133 134 } 135 dev->driver_data = hid_dev; 134 136 135 137 /* … … 182 184 /*----------------------------------------------------------------------------*/ 183 185 184 /* Currently, the framework supports only device adding. Once the framework 185 * supports unplug, more callbacks will be added. */ 186 /** 187 * Callback for removing a device from the driver. 188 * 189 * @param dev Structure representing the device. 190 * 191 * @retval EOK if successful. 192 * @retval EREFUSED if the device is not supported. 193 */ 194 static int usb_hid_device_gone(usb_device_t *dev) 195 { 196 usb_hid_dev_t *hid_dev = dev->driver_data; 197 usb_hid_destroy(hid_dev); 198 return EOK; 199 } 200 201 /** USB generic driver callbacks */ 186 202 static usb_driver_ops_t usb_hid_driver_ops = { 187 .device_add = usb_hid_device_add, 203 .device_add = usb_hid_device_add, 204 .device_gone = usb_hid_device_gone, 188 205 }; 189 206 190 207 191 /* The driver itself. */208 /** The driver itself. */ 192 209 static usb_driver_t usb_hid_driver = { 193 210 .name = NAME, -
uspace/drv/bus/usb/usbhid/usbhid.c
rf2964e45 r98604cc 630 630 } 631 631 632 usb_hid_destroy(hid_dev);632 // usb_hid_destroy(hid_dev); 633 633 } 634 634
Note:
See TracChangeset
for help on using the changeset viewer.