Changeset 49ff5f3 in mainline for uspace/lib/usb/src/ddfiface.c


Ignore:
Timestamp:
2012-04-18T20:55:21Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7769ec9
Parents:
e895352 (diff), 63920b0 (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:

merge mainline changes

File:
1 edited

Legend:

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

    re895352 r49ff5f3  
    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.