Changes in uspace/lib/usb/src/pipes.c [bc1c6fb:e936e8e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipes.c
rbc1c6fb re936e8e 35 35 #include <usb/usb.h> 36 36 #include <usb/pipes.h> 37 #include <usb/debug.h>38 37 #include <usbhc_iface.h> 39 38 #include <usb_iface.h> 40 #include <devman.h>41 39 #include <errno.h> 42 40 #include <assert.h> … … 48 46 * @return USB address or error code. 49 47 */ 50 static usb_address_t get_my_address(int phone, d df_dev_t *dev)48 static usb_address_t get_my_address(int phone, device_t *dev) 51 49 { 52 50 sysarg_t address; 53 54 55 /*56 * We are sending special value as a handle - zero - to get57 * handle of the parent function (that handle was used58 * when registering our device @p dev.59 */60 51 int rc = async_req_2_1(phone, DEV_IFACE_ID(USB_DEV_IFACE), 61 52 IPC_M_USB_GET_ADDRESS, 62 0, &address);53 dev->handle, &address); 63 54 64 55 if (rc != EOK) { … … 74 65 * @return Interface number (negative code means any). 75 66 */ 76 int usb_device_get_assigned_interface(d df_dev_t *device)67 int usb_device_get_assigned_interface(device_t *device) 77 68 { 78 69 int parent_phone = devman_parent_device_connect(device->handle, … … 99 90 * 100 91 * @param connection Connection structure to be initialized. 101 * @param dev Generic device backing the USB device.92 * @param device Generic device backing the USB device. 102 93 * @return Error code. 103 94 */ 104 95 int usb_device_connection_initialize_from_device( 105 usb_device_connection_t *connection, d df_dev_t *dev)96 usb_device_connection_t *connection, device_t *device) 106 97 { 107 98 assert(connection); 108 assert(dev );99 assert(device); 109 100 110 101 int rc; … … 112 103 usb_address_t my_address; 113 104 114 rc = usb_hc_find(dev ->handle, &hc_handle);105 rc = usb_hc_find(device->handle, &hc_handle); 115 106 if (rc != EOK) { 116 107 return rc; 117 108 } 118 109 119 int parent_phone = devman_parent_device_connect(dev ->handle,110 int parent_phone = devman_parent_device_connect(device->handle, 120 111 IPC_FLAG_BLOCKING); 121 112 if (parent_phone < 0) { … … 123 114 } 124 115 125 my_address = get_my_address(parent_phone, dev );116 my_address = get_my_address(parent_phone, device); 126 117 if (my_address < 0) { 127 118 rc = my_address;
Note:
See TracChangeset
for help on using the changeset viewer.