Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/ddfiface.c

    r27ed734c re882e3a  
    3333 * Implementations of DDF interfaces functions (actual implementation).
    3434 */
    35 #include <ipc/devman.h>
    3635#include <devman.h>
    3736#include <async.h>
     37#include <usb_iface.h>
    3838#include <usb/ddfiface.h>
    3939#include <usb/hc.h>
     
    4242#include <errno.h>
    4343#include <assert.h>
     44
     45#include <usb/dev.h>
    4446
    4547/** DDF interface for USB device, implementation for typical hub. */
     
    6567{
    6668        assert(fun);
    67         return usb_hc_find(fun->handle, handle);
     69        return usb_get_hc_by_handle(fun->handle, handle);
    6870}
    6971
     
    9698{
    9799        assert(fun);
    98 
    99         async_sess_t *parent_sess =
    100             devman_parent_device_connect(EXCHANGE_SERIALIZE, fun->handle,
    101             IPC_FLAG_BLOCKING);
    102         if (!parent_sess)
    103                 return ENOMEM;
    104 
    105         async_exch_t *exch = async_exchange_begin(parent_sess);
    106 
    107         sysarg_t addr;
    108         int rc = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE),
    109             IPC_M_USB_GET_MY_ADDRESS, &addr);
    110 
    111         async_exchange_end(exch);
    112         async_hangup(parent_sess);
    113 
    114         if (rc != EOK)
    115                 return rc;
    116 
    117         if (address != NULL)
    118                 *address = (usb_address_t) addr;
    119 
    120         return EOK;
     100        return usb_get_address_by_handle(fun->handle, address);
    121101}
    122102
     
    137117        assert(fun);
    138118        assert(fun->driver_data);
    139         usb_hub_attached_device_t *device = fun->driver_data;
     119        const usb_hub_attached_device_t *device = fun->driver_data;
    140120        assert(device->fun == fun);
    141121        if (address)
Note: See TracChangeset for help on using the changeset viewer.