Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0ee648a in mainline


Ignore:
Timestamp:
2010-11-21T17:20:20Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
31860b7, be2ad7cf
Parents:
4087a33
Message:

Generic HCDHubD can distinguish between HC and hub

File:
1 edited

Legend:

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

    r4087a33 r0ee648a  
    3939#include <errno.h>
    4040
     41#define USB_HUB_DEVICE_NAME "usbhub"
     42
    4143/** List of handled host controllers. */
    4244static LIST_INITIALIZE(hc_list);
     
    6567         * was connected.
    6668         */
    67         bool is_hc = true;
     69        bool is_hc = str_cmp(dev->name, USB_HUB_DEVICE_NAME) != 0;
     70        printf("%s: add_device(name=\"%s\")\n", hc_driver->name, dev->name);
    6871
    6972        if (is_hc) {
     
    9598                return EOK;
    9699        } else {
     100                printf("%s: hub added, hurrah!\n", hc_driver->name);
    97101                /*
    98102                 * We are some (probably deeply nested) hub.
     
    230234                goto failure;
    231235        }
    232         hub->name = "usbhub";
     236        hub->name = USB_HUB_DEVICE_NAME;
    233237
    234238        match_id = create_match_id();
Note: See TracChangeset for help on using the changeset viewer.