Changeset 8e4219ab in mainline for uspace/drv/bus/usb/usbmid/usbmid.c


Ignore:
Timestamp:
2013-08-02T14:04:51Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6fe7683
Parents:
9d15d1b
Message:

Implement and use usb_get_device_handle.

Enables object instantiation on usb interface functions.
avoids forwarding in usbmid driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmid/usbmid.c

    r9d15d1b r8e4219ab  
    5959}
    6060
     61static int usb_iface_device_handle(ddf_fun_t *fun, devman_handle_t *handle)
     62{
     63        assert(fun);
     64        assert(handle);
     65        usb_device_t *usb_dev = usb_device_get(ddf_fun_get_dev(fun));
     66        assert(usb_dev);
     67        *handle = usb_device_get_devman_handle(usb_dev);
     68        return EOK;
     69}
     70
    6171/** Get USB device address by calling the parent usb_device_t.
    6272 *
     
    119129        .get_hc_handle = usb_iface_device_hc_handle,
    120130        .get_my_address = usb_iface_device_address,
     131        .get_device_handle = usb_iface_device_handle,
    121132        .get_my_interface = usb_iface_iface,
    122133        .register_endpoint = usb_iface_register_endpoint,
Note: See TracChangeset for help on using the changeset viewer.