Changeset 67b6fc5 in mainline for uspace/drv/uhci-rhd/port.c


Ignore:
Timestamp:
2011-02-12T03:23:39Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
600733e
Parents:
e0df6c2 (diff), 8f5b6561 (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/drv/uhci-rhd/port.c

    re0df6c2 r67b6fc5  
    3333 */
    3434#include <errno.h>
     35#include <str_error.h>
    3536
    3637#include <usb/usb.h>    /* usb_address_t */
    3738#include <usb/usbdrv.h> /* usb_drv_*     */
    3839#include <usb/debug.h>
     40#include <usb/recognise.h>
    3941
    4042#include "port.h"
     
    204206        assert(port->attached_device == 0);
    205207
    206         ret = usb_drv_register_child_in_devman(port->hc_phone, port->rh,
    207           usb_address, &port->attached_device);
    208 
     208        devman_handle_t hc_handle;
     209        ret = usb_drv_find_hc(port->rh, &hc_handle);
     210        if (ret != EOK) {
     211                usb_log_error("Failed to get handle of host controller: %s.\n",
     212                    str_error(ret));
     213                uhci_port_set_enabled(port, false);
     214                return ENOMEM;
     215        }
     216
     217        ret = usb_device_register_child_in_devman(usb_address, hc_handle,
     218            port->rh, &port->attached_device);
    209219        if (ret != EOK) { /* something went wrong */
    210220                usb_log_error("Failed(%d) in usb_drv_register_child.\n", ret);
Note: See TracChangeset for help on using the changeset viewer.