Changeset bad4a05 in mainline for uspace/lib/usbhost/src


Ignore:
Timestamp:
2018-01-11T04:12:06Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
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)
Message:

usbhost: made device_remove and endpoint_unregister noexcept

Location:
uspace/lib/usbhost/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/bus.c

    ra6c4597 rbad4a05  
    112112 * Invoke the device_remove bus operation.
    113113 */
    114 int bus_device_remove(device_t *dev)
     114void bus_device_remove(device_t *dev)
    115115{
    116116        assert(dev);
    117117
    118118        const bus_ops_t *ops = BUS_OPS_LOOKUP(dev->bus->ops, device_remove);
    119         if (!ops)
    120                 return ENOTSUP;
     119        assert(ops);
    121120
    122121        return ops->device_remove(dev);
     
    266265
    267266        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;
    271269        fibril_mutex_unlock(&device->guard);
    272 
    273         if (r)
    274                 return r;
    275270
    276271        /* Abort a transfer batch, if there was any */
  • uspace/lib/usbhost/src/usb2_bus.c

    ra6c4597 rbad4a05  
    250250 * Release bandwidth reserved by the given endpoint.
    251251 */
    252 static int usb2_bus_unregister_ep(endpoint_t *ep)
     252static void usb2_bus_unregister_ep(endpoint_t *ep)
    253253{
    254254        usb2_bus_t *bus = bus_to_usb2_bus(ep->device->bus);
     
    256256
    257257        bus->free_bw += ep->bandwidth;
    258 
    259         return EOK;
    260258}
    261259
Note: See TracChangeset for help on using the changeset viewer.