Changeset 3121b5f in mainline
- Timestamp:
- 2013-08-07T09:51:53Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e588d12
- Parents:
- 5514cf7
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbmid/usbmid.c
r5514cf7 r3121b5f 73 73 /** DDF interface of the child - USB functions. */ 74 74 static usb_iface_t child_usb_iface = { 75 .get_ device_handle = usb_iface_device_handle,75 .get_my_device_handle = usb_iface_device_handle, 76 76 .get_my_interface = usb_iface_iface_no, 77 77 }; -
uspace/lib/drv/generic/remote_usb.c
r5514cf7 r3121b5f 65 65 typedef enum { 66 66 IPC_M_USB_GET_MY_INTERFACE, 67 IPC_M_USB_GET_ DEVICE_HANDLE,67 IPC_M_USB_GET_MY_DEVICE_HANDLE, 68 68 IPC_M_USB_RESERVE_DEFAULT_ADDRESS, 69 69 IPC_M_USB_RELEASE_DEFAULT_ADDRESS, … … 99 99 * @return Error code. 100 100 */ 101 int usb_get_ device_handle(async_exch_t *exch, devman_handle_t *handle)101 int usb_get_my_device_handle(async_exch_t *exch, devman_handle_t *handle) 102 102 { 103 103 devman_handle_t h = 0; 104 104 const int ret = async_req_1_1(exch, DEV_IFACE_ID(USB_DEV_IFACE), 105 IPC_M_USB_GET_ DEVICE_HANDLE, &h);105 IPC_M_USB_GET_MY_DEVICE_HANDLE, &h); 106 106 if (ret == EOK && handle) 107 107 *handle = (devman_handle_t)h; … … 273 273 274 274 static void remote_usb_get_my_interface(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *); 275 static void remote_usb_get_ device_handle(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);275 static void remote_usb_get_my_device_handle(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *); 276 276 static void remote_usb_reserve_default_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *); 277 277 static void remote_usb_release_default_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *); … … 286 286 static remote_iface_func_ptr_t remote_usb_iface_ops [] = { 287 287 [IPC_M_USB_GET_MY_INTERFACE] = remote_usb_get_my_interface, 288 [IPC_M_USB_GET_ DEVICE_HANDLE] = remote_usb_get_device_handle,288 [IPC_M_USB_GET_MY_DEVICE_HANDLE] = remote_usb_get_my_device_handle, 289 289 [IPC_M_USB_RESERVE_DEFAULT_ADDRESS] = remote_usb_reserve_default_address, 290 290 [IPC_M_USB_RELEASE_DEFAULT_ADDRESS] = remote_usb_release_default_address, … … 323 323 } 324 324 325 void remote_usb_get_ device_handle(ddf_fun_t *fun, void *iface,325 void remote_usb_get_my_device_handle(ddf_fun_t *fun, void *iface, 326 326 ipc_callid_t callid, ipc_call_t *call) 327 327 { 328 328 const usb_iface_t *usb_iface = (usb_iface_t *) iface; 329 329 330 if (usb_iface->get_ device_handle == NULL) {330 if (usb_iface->get_my_device_handle == NULL) { 331 331 async_answer_0(callid, ENOTSUP); 332 332 return; … … 334 334 335 335 devman_handle_t handle; 336 const int ret = usb_iface->get_ device_handle(fun, &handle);336 const int ret = usb_iface->get_my_device_handle(fun, &handle); 337 337 if (ret != EOK) { 338 338 async_answer_0(callid, ret); -
uspace/lib/drv/include/usb_iface.h
r5514cf7 r3121b5f 53 53 54 54 int usb_get_my_interface(async_exch_t *, int *); 55 int usb_get_ device_handle(async_exch_t *, devman_handle_t *);55 int usb_get_my_device_handle(async_exch_t *, devman_handle_t *); 56 56 57 57 int usb_reserve_default_address(async_exch_t *, usb_speed_t); … … 76 76 typedef struct { 77 77 int (*get_my_interface)(ddf_fun_t *, int *); 78 int (*get_ device_handle)(ddf_fun_t *, devman_handle_t *);78 int (*get_my_device_handle)(ddf_fun_t *, devman_handle_t *); 79 79 80 80 int (*reserve_default_address)(ddf_fun_t *, usb_speed_t); -
uspace/lib/usbdev/src/devdrv.c
r5514cf7 r3121b5f 443 443 if (!exch) 444 444 return EPARTY; 445 int ret = usb_get_ device_handle(exch, handle);445 int ret = usb_get_my_device_handle(exch, handle); 446 446 if (ret == EOK) { 447 447 ret = usb_get_my_interface(exch, iface_no); -
uspace/lib/usbhost/src/ddf_helpers.c
r5514cf7 r3121b5f 182 182 } 183 183 184 /** Gets handle of the respective hc (this device, hc function).185 * 186 * @param[in] root_hub_fun Root hub function seeking hc handle.184 /** Gets handle of the respective device. 185 * 186 * @param[in] fun Device function. 187 187 * @param[out] handle Place to write the handle. 188 188 * @return Error code. 189 189 */ 190 static int get_ device_handle(ddf_fun_t *fun, devman_handle_t *handle)190 static int get_my_device_handle(ddf_fun_t *fun, devman_handle_t *handle) 191 191 { 192 192 assert(fun); … … 250 250 /** Root hub USB interface */ 251 251 static usb_iface_t usb_iface = { 252 .get_ device_handle = get_device_handle,252 .get_my_device_handle = get_my_device_handle, 253 253 254 254 .reserve_default_address = reserve_default_address,
Note:
See TracChangeset
for help on using the changeset viewer.