Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/kbd/kbddev.c

    r2b621cb r2d1ba51  
    7171#include "../usbhid.h"
    7272
    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 };
    7573/*----------------------------------------------------------------------------*/
    7674
     
    189187                        break;
    190188                }
    191                 if (kbd_dev->client_sess == NULL) {
    192                         kbd_dev->client_sess = sess;
     189                if (kbd_dev->console_sess == NULL) {
     190                        kbd_dev->console_sess = sess;
    193191                        usb_log_debug("%s: OK\n", __FUNCTION__);
    194192                        async_answer_0(icallid, EOK);
     
    294292{
    295293        usb_log_debug2("Sending kbdev event %d/%d to the console\n", type, key);
    296         if (kbd_dev->client_sess == NULL) {
     294        if (kbd_dev->console_sess == NULL) {
    297295                usb_log_warning(
    298296                    "Connection to console not ready, key discarded.\n");
     
    300298        }
    301299
    302         async_exch_t *exch = async_exchange_begin(kbd_dev->client_sess);
     300        async_exch_t *exch = async_exchange_begin(kbd_dev->console_sess);
    303301        if (exch != NULL) {
    304302                async_msg_2(exch, KBDEV_EVENT, type, key);
     
    501499        /* Store the initialized HID device and HID ops
    502500         * to the DDF function. */
    503         fun->ops = &kbdops;
     501        fun->ops = &kbd_dev->ops;
    504502        fun->driver_data = kbd_dev;
    505503
     
    578576        fibril_mutex_initialize(&kbd_dev->repeat_mtx);
    579577        kbd_dev->initialized = USB_KBD_STATUS_UNINITIALIZED;
     578        kbd_dev->ops.default_handler = default_connection_handler;
    580579
    581580        /* Store link to HID device */
     
    738737
    739738        /* Hangup session to the console. */
    740         if (kbd_dev->client_sess)
    741                 async_hangup(kbd_dev->client_sess);
     739        if (kbd_dev->console_sess)
     740                async_hangup(kbd_dev->console_sess);
    742741
    743742        //assert(!fibril_mutex_is_locked((*kbd_dev)->repeat_mtx));
Note: See TracChangeset for help on using the changeset viewer.