Changeset fbf0589 in mainline for uspace/lib/usb/src/pipes.c
- Timestamp:
- 2011-02-18T20:37:04Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0a46c41e
- Parents:
- 026d6e2 (diff), 374552ef (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipes.c
r026d6e2 rfbf0589 35 35 #include <usb/usb.h> 36 36 #include <usb/pipes.h> 37 #include <usbhc_iface.h> 37 38 #include <errno.h> 38 39 #include <assert.h> 39 #include <usb/usbdrv.h> 40 41 /** Tell USB address assigned to given device. 42 * 43 * @param phone Phone to my HC. 44 * @param dev Device in question. 45 * @return USB address or error code. 46 */ 47 static usb_address_t get_my_address(int phone, device_t *dev) 48 { 49 sysarg_t address; 50 int rc = async_req_2_1(phone, DEV_IFACE_ID(USBHC_DEV_IFACE), 51 IPC_M_USBHC_GET_ADDRESS, 52 dev->handle, &address); 53 54 if (rc != EOK) { 55 return rc; 56 } 57 58 return (usb_address_t) address; 59 } 40 60 41 61 /** Initialize connection to USB device. … … 55 75 usb_address_t my_address; 56 76 57 rc = usb_ drv_find_hc(device, &hc_handle);77 rc = usb_hc_find(device->handle, &hc_handle); 58 78 if (rc != EOK) { 59 79 return rc; … … 65 85 } 66 86 67 my_address = usb_drv_get_my_address(hc_phone, device);87 my_address = get_my_address(hc_phone, device); 68 88 if (my_address < 0) { 69 89 rc = my_address;
Note:
See TracChangeset
for help on using the changeset viewer.