Changeset a81a1d09 in mainline for uspace/lib/usbdev/src/usbdevice.c


Ignore:
Timestamp:
2011-05-11T16:49:28Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
19387b61
Parents:
e1dbcbc (diff), 9212f8a (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 development/ changes

File:
1 moved

Legend:

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

    re1dbcbc ra81a1d09  
    3737#include <usb_iface.h>
    3838#include <usb/usbdevice.h>
     39#include <usb/driver.h>
    3940#include <usb/debug.h>
    4041#include <errno.h>
    4142#include <assert.h>
    42 
    43 /** Find host controller handle that is ancestor of given device.
    44  *
    45  * @param[in] device_handle Device devman handle.
    46  * @param[out] hc_handle Where to store handle of host controller
    47  *      controlling device with @p device_handle handle.
    48  * @return Error code.
    49  */
    50 int usb_hc_find(devman_handle_t device_handle, devman_handle_t *hc_handle)
    51 {
    52         int parent_phone = devman_parent_device_connect(device_handle,
    53             IPC_FLAG_BLOCKING);
    54         if (parent_phone < 0) {
    55                 return parent_phone;
    56         }
    57 
    58         devman_handle_t h;
    59         usb_log_debug("asking for HC handle (my handle is %zu).\n", device_handle);
    60         int rc = async_req_1_1(parent_phone, DEV_IFACE_ID(USB_DEV_IFACE),
    61             IPC_M_USB_GET_HOST_CONTROLLER_HANDLE, &h);
    62 
    63         async_hangup(parent_phone);
    64 
    65         if (rc != EOK) {
    66                 return rc;
    67         }
    68 
    69         if (hc_handle != NULL) {
    70                 *hc_handle = h;
    71         }
    72 
    73         return EOK;
    74 }
    7543
    7644/** Initialize connection to USB host controller.
Note: See TracChangeset for help on using the changeset viewer.