Changeset 73ae3373 in mainline for uspace/drv/usbhid/kbd/kbddev.c


Ignore:
Timestamp:
2011-04-08T07:47:06Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fec47d4
Parents:
dd10e07
Message:

Fixed default connection handler + typo

File:
1 edited

Legend:

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

    rdd10e07 r73ae3373  
    9797
    9898/** Keyboard polling endpoint description for boot protocol class. */
    99 usb_endpoint_description_t ush_hid_kbd_poll_endpoint_description = {
     99usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description = {
    100100        .transfer_type = USB_TRANSFER_INTERRUPT,
    101101        .direction = USB_DIRECTION_IN,
     
    243243        sysarg_t method = IPC_GET_IMETHOD(*icall);
    244244       
    245         usb_kbd_t *kbd_dev = (usb_kbd_t *)fun->driver_data;
    246         assert(kbd_dev != NULL);
     245        usb_hid_dev_t *hid_dev = (usb_hid_dev_t *)fun->driver_data;
     246       
     247        if (hid_dev == NULL || hid_dev->data == NULL) {
     248                async_answer_0(icallid, EINVAL);
     249                return;
     250        }
     251       
     252        assert(hid_dev != NULL);
     253        assert(hid_dev->data != NULL);
     254        usb_kbd_t *kbd_dev = (usb_kbd_t *)hid_dev->data;
    247255
    248256        if (method == IPC_M_CONNECT_TO_ME) {
Note: See TracChangeset for help on using the changeset viewer.