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