Ignore:
File:
1 edited

Legend:

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

    r0ca16307 r228e490  
    4848#include <ctype.h>
    4949#include <errno.h>
     50#include <inttypes.h>
    5051
    5152#include <ipc/driver.h>
     
    8081static void driver_irq_handler(ipc_callid_t iid, ipc_call_t *icall)
    8182{
    82         int id = (int)IPC_GET_METHOD(*icall);
     83        int id = (int)IPC_GET_IMETHOD(*icall);
    8384        interrupt_context_t *ctx;
    8485       
     
    177178        res = driver->driver_ops->add_device(dev);
    178179        if (0 == res) {
    179                 printf("%s: new device with handle = %x was added.\n",
     180                printf("%s: new device with handle=%" PRIun " was added.\n",
    180181                    driver->name, dev_handle);
    181182        } else {
    182                 printf("%s: failed to add a new device with handle = %d.\n",
     183                printf("%s: failed to add a new device with handle = %" PRIun ".\n",
    183184                    driver->name, dev_handle);
    184185                remove_from_devices_list(dev);
     
    199200                ipc_callid_t callid = async_get_call(&call);
    200201
    201                 switch (IPC_GET_METHOD(call)) {
     202                switch (IPC_GET_IMETHOD(call)) {
    202203                case IPC_M_PHONE_HUNGUP:
    203204                        cont = false;
     
    207208                        break;
    208209                default:
    209                         if (!(callid & IPC_CALLID_NOTIFICATION))
    210                                 ipc_answer_0(callid, ENOENT);
     210                        ipc_answer_0(callid, ENOENT);
    211211                }
    212212        }
     
    230230        if (dev == NULL) {
    231231                printf("%s: driver_connection_gen error - no device with handle"
    232                     " %x was found.\n", driver->name, handle);
     232                    " %" PRIun " 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                 ipcarg_t method = IPC_GET_METHOD(call);
     256                sysarg_t method = IPC_GET_IMETHOD(call);
    257257                int iface_idx;
    258258               
     
    294294                                printf("%s: driver_connection_gen error - ",
    295295                                    driver->name);
    296                                 printf("device with handle %d has no interface "
     296                                printf("device with handle %" PRIun " 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                         ipcarg_t iface_method_idx = IPC_GET_ARG1(call);
     310                        sysarg_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 ((ipcarg_t) (IPC_GET_ARG1(*icall))) {
     348        switch ((sysarg_t) (IPC_GET_ARG1(*icall))) {
    349349        case DRIVER_DEVMAN:
    350350                /* handle PnP events from device manager */
     
    418418                goto failure;
    419419
    420         goto leave;
     420        return EOK;
    421421
    422422failure:
     
    431431        }
    432432
    433 leave:
    434433        return rc;
    435434}
Note: See TracChangeset for help on using the changeset viewer.