Changeset eea3e39 in mainline for uspace/lib/usb/src/ddfiface.c
- Timestamp:
- 2011-10-31T09:46:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3562cd18
- Parents:
- cae002c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/ddfiface.c
rcae002c reea3e39 45 45 usb_iface_t usb_iface_hub_impl = { 46 46 .get_hc_handle = usb_iface_get_hc_handle_hub_impl, 47 .get_address = usb_iface_get_address_ hub_impl47 .get_address = usb_iface_get_address_forward_impl, 48 48 }; 49 49 … … 51 51 usb_iface_t usb_iface_hub_child_impl = { 52 52 .get_hc_handle = usb_iface_get_hc_handle_hub_child_impl, 53 .get_address = usb_iface_get_address_ hub_child_impl53 .get_address = usb_iface_get_address_set_my_handle_impl 54 54 }; 55 55 … … 125 125 * @return Error code. 126 126 */ 127 int usb_iface_get_address_ hub_impl(ddf_fun_t *fun, devman_handle_t handle,127 int usb_iface_get_address_forward_impl(ddf_fun_t *fun, devman_handle_t handle, 128 128 usb_address_t *address) 129 129 { 130 130 assert(fun); 131 131 132 132 async_sess_t *parent_sess = 133 133 devman_parent_device_connect(EXCHANGE_SERIALIZE, fun->handle, … … 135 135 if (!parent_sess) 136 136 return ENOMEM; 137 137 138 138 async_exch_t *exch = async_exchange_begin(parent_sess); 139 139 140 140 sysarg_t addr; 141 141 int rc = async_req_2_1(exch, DEV_IFACE_ID(USB_DEV_IFACE), 142 142 IPC_M_USB_GET_ADDRESS, handle, &addr); 143 143 144 144 async_exchange_end(exch); 145 145 async_hangup(parent_sess); 146 146 147 147 if (rc != EOK) 148 148 return rc; 149 149 150 150 if (address != NULL) 151 151 *address = (usb_address_t) addr; 152 152 153 153 return EOK; 154 154 } … … 157 157 * a hub driver. 158 158 * 159 * This implementation eccepts 0 as valid handle and replaces it with fun's 160 * handle. 161 * 159 162 * @param[in] fun Device function the operation is running on. 160 163 * @param[in] handle Devman handle of USB device we want address of. … … 162 165 * @return Error code. 163 166 */ 164 int usb_iface_get_address_ hub_child_impl(ddf_fun_t *fun,167 int usb_iface_get_address_set_my_handle_impl(ddf_fun_t *fun, 165 168 devman_handle_t handle, usb_address_t *address) 166 169 { … … 168 171 handle = fun->handle; 169 172 } 170 return usb_iface_get_address_ hub_impl(fun, handle, address);173 return usb_iface_get_address_forward_impl(fun, handle, address); 171 174 } 172 175
Note:
See TracChangeset
for help on using the changeset viewer.