Changes in uspace/drv/bus/usb/usbhid/kbd/kbddev.c [2b621cb:2d1ba51] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhid/kbd/kbddev.c
r2b621cb r2d1ba51 71 71 #include "../usbhid.h" 72 72 73 static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *);74 static ddf_dev_ops_t kbdops = { .default_handler = default_connection_handler };75 73 /*----------------------------------------------------------------------------*/ 76 74 … … 189 187 break; 190 188 } 191 if (kbd_dev->c lient_sess == NULL) {192 kbd_dev->c lient_sess = sess;189 if (kbd_dev->console_sess == NULL) { 190 kbd_dev->console_sess = sess; 193 191 usb_log_debug("%s: OK\n", __FUNCTION__); 194 192 async_answer_0(icallid, EOK); … … 294 292 { 295 293 usb_log_debug2("Sending kbdev event %d/%d to the console\n", type, key); 296 if (kbd_dev->c lient_sess == NULL) {294 if (kbd_dev->console_sess == NULL) { 297 295 usb_log_warning( 298 296 "Connection to console not ready, key discarded.\n"); … … 300 298 } 301 299 302 async_exch_t *exch = async_exchange_begin(kbd_dev->c lient_sess);300 async_exch_t *exch = async_exchange_begin(kbd_dev->console_sess); 303 301 if (exch != NULL) { 304 302 async_msg_2(exch, KBDEV_EVENT, type, key); … … 501 499 /* Store the initialized HID device and HID ops 502 500 * to the DDF function. */ 503 fun->ops = &kbd ops;501 fun->ops = &kbd_dev->ops; 504 502 fun->driver_data = kbd_dev; 505 503 … … 578 576 fibril_mutex_initialize(&kbd_dev->repeat_mtx); 579 577 kbd_dev->initialized = USB_KBD_STATUS_UNINITIALIZED; 578 kbd_dev->ops.default_handler = default_connection_handler; 580 579 581 580 /* Store link to HID device */ … … 738 737 739 738 /* Hangup session to the console. */ 740 if (kbd_dev->c lient_sess)741 async_hangup(kbd_dev->c lient_sess);739 if (kbd_dev->console_sess) 740 async_hangup(kbd_dev->console_sess); 742 741 743 742 //assert(!fibril_mutex_is_locked((*kbd_dev)->repeat_mtx));
Note:
See TracChangeset
for help on using the changeset viewer.