Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/hub.c

    r56fd7cf r6e3c005  
    3333 * Functions needed by hub drivers.
    3434 */
    35 
    3635#include <usb/dev/hub.h>
    3736#include <usb/dev/pipes.h>
     
    6362                return EBADMEM;
    6463        return usb_hc_bind_address(connection,
    65             attached_device->address, ddf_fun_get_handle(attached_device->fun));
     64            attached_device->address, attached_device->fun->handle);
    6665}
    6766
     
    115114        return EOK;
    116115}
     116
    117117
    118118/** Wrapper for registering attached device to the hub.
     
    160160    ddf_dev_ops_t *dev_ops, void *new_dev_data, ddf_fun_t **new_fun)
    161161{
    162         if ((new_fun == NULL) || (hc_conn == NULL))
     162        if (new_fun == NULL || hc_conn == NULL)
    163163                return EINVAL;
    164164
     
    287287        rc = usb_hub_register_device(hc_conn, &new_device);
    288288        if (rc != EOK) {
     289                /* We know nothing about that data. */
     290                if (new_dev_data)
     291                        child_fun->driver_data = NULL;
    289292                /* The child function is already created. */
    290293                ddf_fun_destroy(child_fun);
Note: See TracChangeset for help on using the changeset viewer.