Changeset bad4a05 in mainline for uspace/lib/usbhost/src
- Timestamp:
- 2018-01-11T04:12:06Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0892663a
- Parents:
- a6c4597
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-11 01:31:42)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-11 04:12:06)
- Location:
- uspace/lib/usbhost/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/bus.c
ra6c4597 rbad4a05 112 112 * Invoke the device_remove bus operation. 113 113 */ 114 intbus_device_remove(device_t *dev)114 void bus_device_remove(device_t *dev) 115 115 { 116 116 assert(dev); 117 117 118 118 const bus_ops_t *ops = BUS_OPS_LOOKUP(dev->bus->ops, device_remove); 119 if (!ops) 120 return ENOTSUP; 119 assert(ops); 121 120 122 121 return ops->device_remove(dev); … … 266 265 267 266 fibril_mutex_lock(&device->guard); 268 const int r = ops->endpoint_unregister(ep); 269 if (!r) 270 device->endpoints[ep->endpoint] = NULL; 267 ops->endpoint_unregister(ep); 268 device->endpoints[ep->endpoint] = NULL; 271 269 fibril_mutex_unlock(&device->guard); 272 273 if (r)274 return r;275 270 276 271 /* Abort a transfer batch, if there was any */ -
uspace/lib/usbhost/src/usb2_bus.c
ra6c4597 rbad4a05 250 250 * Release bandwidth reserved by the given endpoint. 251 251 */ 252 static intusb2_bus_unregister_ep(endpoint_t *ep)252 static void usb2_bus_unregister_ep(endpoint_t *ep) 253 253 { 254 254 usb2_bus_t *bus = bus_to_usb2_bus(ep->device->bus); … … 256 256 257 257 bus->free_bw += ep->bandwidth; 258 259 return EOK;260 258 } 261 259
Note:
See TracChangeset
for help on using the changeset viewer.