Ignore:
File:
1 edited

Legend:

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

    rc2343cc rbc1c6fb  
    5252        sysarg_t address;
    5353
     54
    5455        /*
    5556         * We are sending special value as a handle - zero - to get
     
    9394
    9495        return (int) iface_no;
    95 }
    96 
    97 /** Tell USB address assigned to given device.
    98  *
    99  * @param dev_handle Devman handle of the USB device in question.
    100  * @return USB address or negative error code.
    101  */
    102 usb_address_t usb_device_get_assigned_address(devman_handle_t dev_handle)
    103 {
    104         int parent_phone = devman_parent_device_connect(dev_handle,
    105             IPC_FLAG_BLOCKING);
    106         if (parent_phone < 0) {
    107                 return parent_phone;
    108         }
    109 
    110         sysarg_t address;
    111 
    112         int rc = async_req_2_1(parent_phone, DEV_IFACE_ID(USB_DEV_IFACE),
    113             IPC_M_USB_GET_ADDRESS,
    114             dev_handle, &address);
    115 
    116         if (rc != EOK) {
    117                 return rc;
    118         }
    119 
    120         async_hangup(parent_phone);
    121 
    122         return (usb_address_t) address;
    12396}
    12497
Note: See TracChangeset for help on using the changeset viewer.