Ignore:
Timestamp:
2011-12-28T13:05:59Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8afeb04
Parents:
295f658
Message:

usbhid: Remove useless structure members. Rename references to console.

File:
1 edited

Legend:

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

    r295f658 r2b621cb  
    7171#include "../usbhid.h"
    7272
     73static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *);
     74static ddf_dev_ops_t kbdops = { .default_handler = default_connection_handler };
    7375/*----------------------------------------------------------------------------*/
    7476
     
    187189                        break;
    188190                }
    189                 if (kbd_dev->console_sess == NULL) {
    190                         kbd_dev->console_sess = sess;
     191                if (kbd_dev->client_sess == NULL) {
     192                        kbd_dev->client_sess = sess;
    191193                        usb_log_debug("%s: OK\n", __FUNCTION__);
    192194                        async_answer_0(icallid, EOK);
     
    292294{
    293295        usb_log_debug2("Sending kbdev event %d/%d to the console\n", type, key);
    294         if (kbd_dev->console_sess == NULL) {
     296        if (kbd_dev->client_sess == NULL) {
    295297                usb_log_warning(
    296298                    "Connection to console not ready, key discarded.\n");
     
    298300        }
    299301
    300         async_exch_t *exch = async_exchange_begin(kbd_dev->console_sess);
     302        async_exch_t *exch = async_exchange_begin(kbd_dev->client_sess);
    301303        if (exch != NULL) {
    302304                async_msg_2(exch, KBDEV_EVENT, type, key);
     
    499501        /* Store the initialized HID device and HID ops
    500502         * to the DDF function. */
    501         fun->ops = &kbd_dev->ops;
     503        fun->ops = &kbdops;
    502504        fun->driver_data = kbd_dev;
    503505
     
    576578        fibril_mutex_initialize(&kbd_dev->repeat_mtx);
    577579        kbd_dev->initialized = USB_KBD_STATUS_UNINITIALIZED;
    578         kbd_dev->ops.default_handler = default_connection_handler;
    579580
    580581        /* Store link to HID device */
     
    737738
    738739        /* Hangup session to the console. */
    739         if (kbd_dev->console_sess)
    740                 async_hangup(kbd_dev->console_sess);
     740        if (kbd_dev->client_sess)
     741                async_hangup(kbd_dev->client_sess);
    741742
    742743        //assert(!fibril_mutex_is_locked((*kbd_dev)->repeat_mtx));
Note: See TracChangeset for help on using the changeset viewer.