Changeset f50f722 in mainline for uspace/lib/usb/src/hub.c


Ignore:
Timestamp:
2011-05-08T16:04:05Z (13 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1989cdf
Parents:
68b614e (diff), 7b6f116 (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:

merged development changes

File:
1 edited

Legend:

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

    r68b614e rf50f722  
    117117            DEV_IFACE_ID(USBHC_DEV_IFACE),
    118118            IPC_M_USBHC_RELEASE_ADDRESS, address);
     119}
     120
     121/** Get handle of USB device with given address.
     122 *
     123 * @param[in] connection Opened connection to host controller.
     124 * @param[in] address Address of device in question.
     125 * @param[out] handle Where to write the device handle.
     126 * @return Error code.
     127 */
     128int usb_hc_get_handle_by_address(usb_hc_connection_t *connection,
     129    usb_address_t address, devman_handle_t *handle)
     130{
     131        CHECK_CONNECTION(connection);
     132
     133        sysarg_t tmp;
     134        int rc = async_req_2_1(connection->hc_phone,
     135            DEV_IFACE_ID(USBHC_DEV_IFACE),
     136            IPC_M_USBHC_GET_HANDLE_BY_ADDRESS,
     137            address, &tmp);
     138        if ((rc == EOK) && (handle != NULL)) {
     139                *handle = tmp;
     140        }
     141
     142        return rc;
    119143}
    120144
Note: See TracChangeset for help on using the changeset viewer.