Changeset 0206d35 in mainline for uspace/lib/usbhost/src/ddf_helpers.c


Ignore:
Timestamp:
2017-10-25T00:03:57Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c3d926f
Parents:
56db65d
Message:

Moving things around to improve isolation of responsibilities

Bus interface was simplified, xHCI implementation of address_device was spread into stack of rh → bus → hc and back.

File:
1 edited

Legend:

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

    r56db65d r0206d35  
    104104                endpoint_desc->max_packet_size, endpoint_desc->usb2.polling_interval);
    105105
    106         return bus_add_ep(hcd->bus, dev, endpoint_desc);
     106        return bus_add_endpoint(hcd->bus, dev, endpoint_desc, NULL);
    107107}
    108108
     
    130130                dev->address, endpoint_desc->endpoint_no,
    131131                usb_str_direction(endpoint_desc->direction));
    132         return bus_remove_ep(hcd->bus, dev, target, endpoint_desc->direction);
     132
     133        endpoint_t *ep = bus_find_endpoint(hcd->bus, dev, target, endpoint_desc->direction);
     134        if (!ep)
     135                return ENOENT;
     136
     137        return bus_remove_endpoint(hcd->bus, ep);
    133138}
    134139
Note: See TracChangeset for help on using the changeset viewer.