Ignore:
Timestamp:
2018-01-30T03:20:45Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a6cc679
Parents:
8bfb163 (diff), 6a5d05b (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:

Merge commit '6a5d05bd2551e64111bea4f9332dd7448c26ce84' into forwardport

Separate return value from error code in gen_irq_code*().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/adb/cuda_adb/cuda_adb.c

    r8bfb163 r132ab5d1  
    4646#include <stdbool.h>
    4747#include <stddef.h>
    48 #include <sysinfo.h>
    4948#include <stdint.h>
    5049#include <stdio.h>
     
    5857static void cuda_dev_connection(ipc_callid_t, ipc_call_t *, void *);
    5958static int cuda_init(cuda_t *);
    60 static void cuda_irq_handler(ipc_callid_t, ipc_call_t *, void *);
     59static void cuda_irq_handler(ipc_call_t *, void *);
    6160
    6261static void cuda_irq_listen(cuda_t *);
     
    109108};
    110109
    111 static int cuda_dev_create(cuda_t *cuda, const char *name, adb_dev_t **rdev)
     110static int cuda_dev_create(cuda_t *cuda, const char *name, const char *id,
     111    adb_dev_t **rdev)
    112112{
    113113        adb_dev_t *dev = NULL;
     
    115115        int rc;
    116116
    117         fun = ddf_fun_create(cuda->dev, fun_exposed, name);
     117        fun = ddf_fun_create(cuda->dev, fun_inner, name);
    118118        if (fun == NULL) {
    119119                ddf_msg(LVL_ERROR, "Failed creating function '%s'.", name);
     120                rc = ENOMEM;
     121                goto error;
     122        }
     123
     124        rc = ddf_fun_add_match_id(fun, id, 10);
     125        if (rc != EOK) {
     126                ddf_msg(LVL_ERROR, "Failed adding match ID.");
    120127                rc = ENOMEM;
    121128                goto error;
     
    156163        cuda->phys_base = res->base;
    157164
    158         rc = cuda_dev_create(cuda, "kbd", &kbd);
     165        rc = cuda_dev_create(cuda, "kbd", "adb/keyboard", &kbd);
    159166        if (rc != EOK)
    160167                goto error;
    161168
    162         rc = cuda_dev_create(cuda, "mouse", &mouse);
     169        rc = cuda_dev_create(cuda, "mouse", "adb/mouse", &mouse);
    163170        if (rc != EOK)
    164171                goto error;
     
    245252        cuda_irq_code.cmds[0].addr = (void *) &((cuda_regs_t *)
    246253            cuda->phys_base)->ifr;
    247         async_irq_subscribe(10, cuda_irq_handler, cuda, &cuda_irq_code);
     254        async_irq_subscribe(10, cuda_irq_handler, cuda, &cuda_irq_code, NULL);
    248255
    249256        /* Enable SR interrupt. */
     
    257264}
    258265
    259 static void cuda_irq_handler(ipc_callid_t iid, ipc_call_t *call, void *arg)
     266static void cuda_irq_handler(ipc_call_t *call, void *arg)
    260267{
    261268        uint8_t rbuf[CUDA_RCV_BUF_SIZE];
Note: See TracChangeset for help on using the changeset viewer.