Ignore:
File:
1 edited

Legend:

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

    r95120c3 r27ed734c  
    3737
    3838#include "usb_iface.h"
    39 #include "driver.h"
     39#include "ddf/driver.h"
    4040
    4141
    42 static void remote_usb_get_address(device_t *, void *, ipc_callid_t, ipc_call_t *);
    43 static void remote_usb_get_interface(device_t *, void *, ipc_callid_t, ipc_call_t *);
    44 static void remote_usb_get_hc_handle(device_t *, void *, ipc_callid_t, ipc_call_t *);
     42static void remote_usb_get_my_address(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
     43static void remote_usb_get_interface(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
     44static void remote_usb_get_hc_handle(ddf_fun_t *, void *, ipc_callid_t, ipc_call_t *);
    4545//static void remote_usb(device_t *, void *, ipc_callid_t, ipc_call_t *);
    4646
    4747/** Remote USB interface operations. */
    4848static remote_iface_func_ptr_t remote_usb_iface_ops [] = {
    49         remote_usb_get_address,
    50         remote_usb_get_interface,
    51         remote_usb_get_hc_handle
     49        [IPC_M_USB_GET_MY_ADDRESS] = remote_usb_get_my_address,
     50        [IPC_M_USB_GET_INTERFACE] = remote_usb_get_interface,
     51        [IPC_M_USB_GET_HOST_CONTROLLER_HANDLE] = remote_usb_get_hc_handle,
    5252};
    5353
     
    6161
    6262
    63 void remote_usb_get_address(device_t *device, void *iface,
     63void remote_usb_get_my_address(ddf_fun_t *fun, void *iface,
    6464    ipc_callid_t callid, ipc_call_t *call)
    6565{
    6666        usb_iface_t *usb_iface = (usb_iface_t *) iface;
    6767
    68         if (usb_iface->get_address == NULL) {
     68        if (usb_iface->get_my_address == NULL) {
    6969                async_answer_0(callid, ENOTSUP);
    7070                return;
    7171        }
    7272
    73         devman_handle_t handle = DEV_IPC_GET_ARG1(*call);
    74 
    7573        usb_address_t address;
    76         int rc = usb_iface->get_address(device, handle, &address);
     74        int rc = usb_iface->get_my_address(fun, &address);
    7775        if (rc != EOK) {
    7876                async_answer_0(callid, rc);
     
    8280}
    8381
    84 void remote_usb_get_interface(device_t *device, void *iface,
     82void remote_usb_get_interface(ddf_fun_t *fun, void *iface,
    8583    ipc_callid_t callid, ipc_call_t *call)
    8684{
     
    9593
    9694        int iface_no;
    97         int rc = usb_iface->get_interface(device, handle, &iface_no);
     95        int rc = usb_iface->get_interface(fun, handle, &iface_no);
    9896        if (rc != EOK) {
    9997                async_answer_0(callid, rc);
     
    103101}
    104102
    105 void remote_usb_get_hc_handle(device_t *device, void *iface,
     103void remote_usb_get_hc_handle(ddf_fun_t *fun, void *iface,
    106104    ipc_callid_t callid, ipc_call_t *call)
    107105{
     
    114112
    115113        devman_handle_t handle;
    116         int rc = usb_iface->get_hc_handle(device, &handle);
     114        int rc = usb_iface->get_hc_handle(fun, &handle);
    117115        if (rc != EOK) {
    118116                async_answer_0(callid, rc);
Note: See TracChangeset for help on using the changeset viewer.