Ignore:
File:
1 edited

Legend:

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

    r228e490 r0ca16307  
    4848#include <ctype.h>
    4949#include <errno.h>
    50 #include <inttypes.h>
    5150
    5251#include <ipc/driver.h>
     
    8180static void driver_irq_handler(ipc_callid_t iid, ipc_call_t *icall)
    8281{
    83         int id = (int)IPC_GET_IMETHOD(*icall);
     82        int id = (int)IPC_GET_METHOD(*icall);
    8483        interrupt_context_t *ctx;
    8584       
     
    178177        res = driver->driver_ops->add_device(dev);
    179178        if (0 == res) {
    180                 printf("%s: new device with handle=%" PRIun " was added.\n",
     179                printf("%s: new device with handle = %x was added.\n",
    181180                    driver->name, dev_handle);
    182181        } else {
    183                 printf("%s: failed to add a new device with handle = %" PRIun ".\n",
     182                printf("%s: failed to add a new device with handle = %d.\n",
    184183                    driver->name, dev_handle);
    185184                remove_from_devices_list(dev);
     
    200199                ipc_callid_t callid = async_get_call(&call);
    201200
    202                 switch (IPC_GET_IMETHOD(call)) {
     201                switch (IPC_GET_METHOD(call)) {
    203202                case IPC_M_PHONE_HUNGUP:
    204203                        cont = false;
     
    208207                        break;
    209208                default:
    210                         ipc_answer_0(callid, ENOENT);
     209                        if (!(callid & IPC_CALLID_NOTIFICATION))
     210                                ipc_answer_0(callid, ENOENT);
    211211                }
    212212        }
     
    230230        if (dev == NULL) {
    231231                printf("%s: driver_connection_gen error - no device with handle"
    232                     " %" PRIun " was found.\n", driver->name, handle);
     232                    " %x was found.\n", driver->name, handle);
    233233                ipc_answer_0(iid, ENOENT);
    234234                return;
     
    254254                ipc_call_t call;
    255255                callid = async_get_call(&call);
    256                 sysarg_t method = IPC_GET_IMETHOD(call);
     256                ipcarg_t method = IPC_GET_METHOD(call);
    257257                int iface_idx;
    258258               
     
    294294                                printf("%s: driver_connection_gen error - ",
    295295                                    driver->name);
    296                                 printf("device with handle %" PRIun " has no interface "
     296                                printf("device with handle %d has no interface "
    297297                                    "with id %d.\n", handle, iface_idx);
    298298                                ipc_answer_0(callid, ENOTSUP);
     
    308308
    309309                        /* get the method of the remote interface */
    310                         sysarg_t iface_method_idx = IPC_GET_ARG1(call);
     310                        ipcarg_t iface_method_idx = IPC_GET_ARG1(call);
    311311                        remote_iface_func_ptr_t iface_method_ptr =
    312312                            get_remote_method(rem_iface, iface_method_idx);
     
    346346{
    347347        /* Select interface */
    348         switch ((sysarg_t) (IPC_GET_ARG1(*icall))) {
     348        switch ((ipcarg_t) (IPC_GET_ARG1(*icall))) {
    349349        case DRIVER_DEVMAN:
    350350                /* handle PnP events from device manager */
     
    418418                goto failure;
    419419
    420         return EOK;
     420        goto leave;
    421421
    422422failure:
     
    431431        }
    432432
     433leave:
    433434        return rc;
    434435}
Note: See TracChangeset for help on using the changeset viewer.