Changes in uspace/srv/hw/char/i8042/i8042.c [7e752b2:ffa2c8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/char/i8042/i8042.c
r7e752b2 rffa2c8ef 40 40 #include <libarch/ddi.h> 41 41 #include <devmap.h> 42 #include <ipc/ipc.h>43 42 #include <async.h> 44 43 #include <unistd.h> … … 148 147 rc = devmap_device_register(name, &i8042_port[i].devmap_handle); 149 148 if (rc != EOK) { 150 devmap_hangup_phone(DEVMAP_DRIVER);151 149 printf(NAME ": Unable to register device %s.\n", name); 152 150 return rc; … … 200 198 i8042_kbd.cmds[0].addr = (void *) &((i8042_t *) i8042_kernel)->status; 201 199 i8042_kbd.cmds[3].addr = (void *) &((i8042_t *) i8042_kernel)->data; 202 ipc_register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd);203 ipc_register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd);200 register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd); 201 register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd); 204 202 printf("%s: registered for interrupts %" PRIun " and %" PRIun "\n", 205 203 NAME, inr_a, inr_b); … … 219 217 ipc_callid_t callid; 220 218 ipc_call_t call; 221 ipcarg_t method;219 sysarg_t method; 222 220 devmap_handle_t dh; 223 221 int retval; … … 237 235 238 236 if (dev_id < 0) { 239 ipc_answer_0(iid, EINVAL);237 async_answer_0(iid, EINVAL); 240 238 return; 241 239 } 242 240 243 241 /* Answer the IPC_M_CONNECT_ME_TO call. */ 244 ipc_answer_0(iid, EOK);242 async_answer_0(iid, EOK); 245 243 246 244 printf(NAME ": accepted connection\n"); … … 248 246 while (1) { 249 247 callid = async_get_call(&call); 250 method = IPC_GET_ METHOD(call);248 method = IPC_GET_IMETHOD(call); 251 249 switch (method) { 252 250 case IPC_M_PHONE_HUNGUP: 253 251 /* The other side has hung up. */ 254 ipc_answer_0(callid, EOK);252 async_answer_0(callid, EOK); 255 253 return; 256 254 case IPC_M_CONNECT_TO_ME: … … 273 271 break; 274 272 } 275 ipc_answer_0(callid, retval);273 async_answer_0(callid, retval); 276 274 } 277 275 }
Note:
See TracChangeset
for help on using the changeset viewer.