Ignore:
Timestamp:
2011-05-08T19:06:32Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
23f40280, ebf6a40
Parents:
11349a85 (diff), 7b6f116 (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.
Message:

Development branch changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_usbhc.c

    r11349a85 r511cfc8  
    5252static void remote_usbhc_request_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
    5353static void remote_usbhc_bind_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
     54static void remote_usbhc_find_by_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
    5455static void remote_usbhc_release_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
    5556static void remote_usbhc_register_endpoint(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
     
    6162        remote_usbhc_request_address,
    6263        remote_usbhc_bind_address,
     64        remote_usbhc_find_by_address,
    6365        remote_usbhc_release_address,
    6466
     
    161163
    162164        async_answer_0(callid, rc);
     165}
     166
     167void remote_usbhc_find_by_address(ddf_fun_t *fun, void *iface,
     168    ipc_callid_t callid, ipc_call_t *call)
     169{
     170        usbhc_iface_t *usb_iface = (usbhc_iface_t *) iface;
     171
     172        if (!usb_iface->find_by_address) {
     173                async_answer_0(callid, ENOTSUP);
     174                return;
     175        }
     176
     177        usb_address_t address = (usb_address_t) DEV_IPC_GET_ARG1(*call);
     178        devman_handle_t handle;
     179        int rc = usb_iface->find_by_address(fun, address, &handle);
     180
     181        if (rc == EOK) {
     182                async_answer_1(callid, EOK, handle);
     183        } else {
     184                async_answer_0(callid, rc);
     185        }
    163186}
    164187
Note: See TracChangeset for help on using the changeset viewer.