Changeset 844f4ef in mainline
- Timestamp:
- 2011-10-12T18:27:05Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9636bad
- Parents:
- 7be3638
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/devdrv.c
r7be3638 r844f4ef 151 151 return rc; 152 152 } 153 gen_dev->driver_data = dev; 153 154 154 155 return driver->ops->device_add(dev); … … 161 162 if (driver->ops->device_rem == NULL) 162 163 return ENOTSUP; 163 164 return ENOTSUP;164 /* Just tell the driver to stop whatever it is doing, keep structures */ 165 return driver->ops->device_rem(gen_dev->driver_data); 165 166 } 166 167 /*----------------------------------------------------------------------------*/ … … 169 170 assert(driver); 170 171 assert(driver->ops); 171 assert(driver->ops->device_gone); 172 173 return ENOTSUP; 172 if (driver->ops->device_gone == NULL) 173 return ENOTSUP; 174 const int ret = driver->ops->device_gone(gen_dev->driver_data); 175 if (ret == EOK) 176 usb_device_destroy(gen_dev->driver_data); 177 178 return ret; 174 179 } 175 180 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.