Changeset 4e8e1f5 in mainline for uspace/drv/usbhub/usbhub.c


Ignore:
Timestamp:
2011-02-11T18:10:21Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d321cd7
Parents:
79d2987
Message:

Device recognition uses pipe API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhub/usbhub.c

    r79d2987 r4e8e1f5  
    3636#include <bool.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839
    3940#include <usb_iface.h>
    4041#include <usb/usbdrv.h>
    4142#include <usb/descriptor.h>
     43#include <usb/recognise.h>
    4244#include <usb/devreq.h>
    4345#include <usb/classes/hub.h>
     
    317319        }
    318320
     321        devman_handle_t hc_handle;
     322        opResult = usb_drv_find_hc(hub->device, &hc_handle);
     323        if (opResult != EOK) {
     324                usb_log_error("Failed to get handle of host controller: %s.\n",
     325                    str_error(opResult));
     326                return;
     327        }
     328
    319329        devman_handle_t child_handle;
    320         opResult = usb_drv_register_child_in_devman(hc, hub->device,
    321             new_device_address, &child_handle);
     330        opResult = usb_device_register_child_in_devman(new_device_address,
     331            hc_handle, hub->device, &child_handle);
    322332        if (opResult != EOK) {
    323333                dprintf(USB_LOG_LEVEL_ERROR, "could not start driver for new device");
Note: See TracChangeset for help on using the changeset viewer.