Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2011-08-16T18:53:00Z (10 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master
Children:
49160c4
Parents:
e0e922d (diff), 45058baa (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 mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    re0e922d rdb6e419  
    4343#include <ddi.h>
    4444#include <libarch/ddi.h>
    45 #include <devmap.h>
     45#include <loc.h>
    4646#include <sysinfo.h>
    4747#include <errno.h>
     
    5353
    5454// FIXME: remove this header
    55 #include <kernel/ipc/ipc_methods.h>
     55#include <abi/ipc/methods.h>
    5656
    5757#define NAME "cuda_adb"
     
    147147int main(int argc, char *argv[])
    148148{
    149         devmap_handle_t devmap_handle;
     149        service_id_t service_id;
    150150        int rc;
    151151        int i;
     
    155155        for (i = 0; i < ADB_MAX_ADDR; ++i) {
    156156                adb_dev[i].client_phone = -1;
    157                 adb_dev[i].devmap_handle = 0;
    158         }
    159 
    160         rc = devmap_driver_register(NAME, cuda_connection);
     157                adb_dev[i].service_id = 0;
     158        }
     159
     160        rc = loc_server_register(NAME, cuda_connection);
    161161        if (rc < 0) {
    162                 printf(NAME ": Unable to register driver.\n");
     162                printf(NAME ": Unable to register server.\n");
    163163                return rc;
    164164        }
    165165
    166         rc = devmap_device_register("adb/kbd", &devmap_handle);
     166        rc = loc_service_register("adb/kbd", &service_id);
    167167        if (rc != EOK) {
    168                 printf(NAME ": Unable to register device %s.\n", "adb/kdb");
     168                printf(NAME ": Unable to register service %s.\n", "adb/kdb");
    169169                return rc;
    170170        }
    171171
    172         adb_dev[2].devmap_handle = devmap_handle;
    173         adb_dev[8].devmap_handle = devmap_handle;
    174 
    175         rc = devmap_device_register("adb/mouse", &devmap_handle);
     172        adb_dev[2].service_id = service_id;
     173        adb_dev[8].service_id = service_id;
     174
     175        rc = loc_service_register("adb/mouse", &service_id);
    176176        if (rc != EOK) {
    177                 printf(NAME ": Unable to register device %s.\n", "adb/mouse");
     177                printf(NAME ": Unable to register servise %s.\n", "adb/mouse");
    178178                return rc;
    179179        }
    180180
    181         adb_dev[9].devmap_handle = devmap_handle;
     181        adb_dev[9].service_id = service_id;
    182182
    183183        if (cuda_init() < 0) {
     
    198198        ipc_call_t call;
    199199        sysarg_t method;
    200         devmap_handle_t dh;
     200        service_id_t dsid;
    201201        int retval;
    202202        int dev_addr, i;
    203203
    204204        /* Get the device handle. */
    205         dh = IPC_GET_ARG1(*icall);
     205        dsid = IPC_GET_ARG1(*icall);
    206206
    207207        /* Determine which disk device is the client connecting to. */
    208208        dev_addr = -1;
    209209        for (i = 0; i < ADB_MAX_ADDR; i++) {
    210                 if (adb_dev[i].devmap_handle == dh)
     210                if (adb_dev[i].service_id == dsid)
    211211                        dev_addr = i;
    212212        }
     
    242242                         */
    243243                        for (i = 0; i < ADB_MAX_ADDR; ++i) {
    244                                 if (adb_dev[i].devmap_handle == dh) {
     244                                if (adb_dev[i].service_id == dsid) {
    245245                                        adb_dev[i].client_phone = IPC_GET_ARG5(call);
    246246                                }
Note: See TracChangeset for help on using the changeset viewer.