Changeset 8ff0bd2 in mainline for uspace/srv/hw/char/i8042/i8042.c
- Timestamp:
- 2011-09-04T11:30:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 03bc76a
- Parents:
- d2c67e7 (diff), deac215e (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/char/i8042/i8042.c
rd2c67e7 r8ff0bd2 39 39 #include <ddi.h> 40 40 #include <libarch/ddi.h> 41 #include < devmap.h>41 #include <loc.h> 42 42 #include <async.h> 43 43 #include <async_obsolete.h> … … 50 50 51 51 // FIXME: remove this header 52 #include < kernel/ipc/ipc_methods.h>52 #include <abi/ipc/methods.h> 53 53 54 54 #define NAME "i8042" … … 122 122 123 123 static void i8042_irq_handler(ipc_callid_t iid, ipc_call_t *call); 124 static void i8042_connection(ipc_callid_t iid, ipc_call_t *icall );124 static void i8042_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg); 125 125 static int i8042_init(void); 126 126 static void i8042_port_write(int devid, uint8_t data); … … 135 135 printf(NAME ": i8042 PS/2 port driver\n"); 136 136 137 rc = devmap_driver_register(NAME, i8042_connection);137 rc = loc_server_register(NAME, i8042_connection); 138 138 if (rc < 0) { 139 printf(NAME ": Unable to register driver.\n");139 printf(NAME ": Unable to register server.\n"); 140 140 return rc; 141 141 } … … 148 148 149 149 snprintf(name, 16, "%s/ps2%c", NAMESPACE, dchar[i]); 150 rc = devmap_device_register(name, &i8042_port[i].devmap_handle);150 rc = loc_service_register(name, &i8042_port[i].service_id); 151 151 if (rc != EOK) { 152 152 printf(NAME ": Unable to register device %s.\n", name); … … 216 216 217 217 /** Character device connection handler */ 218 static void i8042_connection(ipc_callid_t iid, ipc_call_t *icall )218 static void i8042_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 219 219 { 220 220 ipc_callid_t callid; 221 221 ipc_call_t call; 222 222 sysarg_t method; 223 devmap_handle_t dh;223 service_id_t dsid; 224 224 int retval; 225 225 int dev_id, i; … … 228 228 229 229 /* Get the device handle. */ 230 d h= IPC_GET_ARG1(*icall);230 dsid = IPC_GET_ARG1(*icall); 231 231 232 232 /* Determine which disk device is the client connecting to. */ 233 233 dev_id = -1; 234 234 for (i = 0; i < MAX_DEVS; i++) { 235 if (i8042_port[i]. devmap_handle == dh)235 if (i8042_port[i].service_id == dsid) 236 236 dev_id = i; 237 237 }
Note:
See TracChangeset
for help on using the changeset viewer.