Changeset 90994fa in mainline for uspace/lib/usbdev/src/hub.c


Ignore:
Timestamp:
2011-10-12T20:03:36Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
162726b
Parents:
205f0766
Message:

usb: Hubs should store child functions not just handles.

File:
1 edited

Legend:

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

    r205f0766 r90994fa  
    105105        int rc = async_req_3_0(exch, DEV_IFACE_ID(USBHC_DEV_IFACE),
    106106            IPC_M_USBHC_BIND_ADDRESS,
    107             attached_device->address, attached_device->handle);
     107            attached_device->address, attached_device->fun->handle);
    108108        async_exchange_end(exch);
    109109       
     
    320320         */
    321321        /* FIXME: create device_register that will get opened ctrl pipe. */
    322         devman_handle_t child_handle;
     322        ddf_fun_t *child_fun;
    323323        rc = usb_device_register_child_in_devman(dev_addr, dev_conn.hc_handle,
    324             parent, &child_handle,
    325             dev_ops, new_dev_data, new_fun);
     324            parent, NULL,
     325            dev_ops, new_dev_data, &child_fun);
    326326        if (rc != EOK) {
    327327                rc = ESTALL;
     
    334334        usb_hub_attached_device_t new_device = {
    335335                .address = dev_addr,
    336                 .handle = child_handle
     336                .fun = child_fun,
    337337        };
    338338        rc = usb_hc_register_device(&hc_conn, &new_device);
     
    351351        }
    352352        if (assigned_handle != NULL) {
    353                 *assigned_handle = child_handle;
     353                *assigned_handle = child_fun->handle;
     354        }
     355        if (new_fun != NULL) {
     356                *new_fun = child_fun;
    354357        }
    355358
Note: See TracChangeset for help on using the changeset viewer.