Changeset deece2f in mainline for uspace/lib/usb/src/pipesinit.c


Ignore:
Timestamp:
2011-02-21T22:25:58Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
233e68d
Parents:
fb78ae72 (diff), dbe25f1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Development branch merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/pipesinit.c

    rfb78ae72 rdeece2f  
    109109 * @param mapping_count Number of endpoint mappings in @p mapping.
    110110 * @param found_endpoint Description of found endpoint.
     111 * @param interface_number Number of currently processed interface.
    111112 * @return Endpoint mapping corresponding to @p found_endpoint.
    112113 * @retval NULL No corresponding endpoint found.
     
    114115static usb_endpoint_mapping_t *find_endpoint_mapping(
    115116    usb_endpoint_mapping_t *mapping, size_t mapping_count,
    116     usb_endpoint_description_t *found_endpoint)
     117    usb_endpoint_description_t *found_endpoint,
     118    int interface_number)
    117119{
    118120        while (mapping_count > 0) {
    119                 if (endpoint_fits_description(mapping->description,
    120                     found_endpoint)) {
     121                bool interface_number_fits = (mapping->interface_no < 0)
     122                    || (mapping->interface_no == interface_number);
     123
     124                bool endpoint_descriptions_fits = endpoint_fits_description(
     125                    mapping->description, found_endpoint);
     126
     127                if (interface_number_fits && endpoint_descriptions_fits) {
    121128                        return mapping;
    122129                }
     
    169176         */
    170177        usb_endpoint_mapping_t *ep_mapping = find_endpoint_mapping(mapping,
    171             mapping_count, &description);
     178            mapping_count, &description, interface->interface_number);
    172179        if (ep_mapping == NULL) {
    173180                return ENOENT;
Note: See TracChangeset for help on using the changeset viewer.