Changeset 96646a6 in mainline
- Timestamp:
- 2011-10-12T15:49:35Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e5ce07
- Parents:
- 1a4ea01d
- Location:
- uspace/lib/usbdev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/include/usb/dev/driver.h
r1a4ea01d r96646a6 114 114 /** Callback when a new device was added to the system. */ 115 115 int (*device_add)(usb_device_t *); 116 /** Callback when a device is about to be removed from the system. */ 117 int (*device_rem)(usb_device_t *); 118 /** Callback when a device was removed from the system. */ 119 int (*device_gone)(usb_device_t *); 116 120 } usb_driver_ops_t; 117 121 -
uspace/lib/usbdev/src/devdrv.c
r1a4ea01d r96646a6 42 42 43 43 static int generic_device_add(ddf_dev_t *); 44 static int generic_device_remove(ddf_dev_t *); 45 static int generic_device_gone(ddf_dev_t *); 44 46 45 47 static driver_ops_t generic_driver_ops = { 46 .add_device = generic_device_add 48 .add_device = generic_device_add, 49 .dev_remove = generic_device_remove, 50 .dev_gone = generic_device_gone, 47 51 }; 48 52 static driver_t generic_driver = { … … 150 154 return driver->ops->device_add(dev); 151 155 } 152 156 /*----------------------------------------------------------------------------*/ 157 int generic_device_remove(ddf_dev_t *gen_dev) 158 { 159 assert(driver); 160 assert(driver->ops); 161 if (driver->ops->device_rem == NULL) 162 return ENOTSUP; 163 164 return ENOTSUP; 165 } 166 /*----------------------------------------------------------------------------*/ 167 int generic_device_gone(ddf_dev_t *gen_dev) 168 { 169 assert(driver); 170 assert(driver->ops); 171 assert(driver->ops->device_gone); 172 173 return ENOTSUP; 174 } 175 /*----------------------------------------------------------------------------*/ 153 176 /** Destroy existing pipes of a USB device. 154 177 *
Note:
See TracChangeset
for help on using the changeset viewer.