Changeset e60436b in mainline for uspace/drv/usbhid/usbhid.c


Ignore:
Timestamp:
2011-04-21T19:58:20Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36f737a
Parents:
3bcac68
Message:

Properly ported HID driver and KBD subdriver to the new parser API.

File:
1 edited

Legend:

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

    r3bcac68 re60436b  
    192192        }
    193193       
    194         assert(hid_dev->parser != NULL);
     194        assert(hid_dev->report != NULL);
    195195       
    196196        usb_log_debug("Compare flags: %d\n", mapping->compare);
    197         size_t size = usb_hid_report_input_length(hid_dev->parser, usage_path,
     197        size_t size = usb_hid_report_input_length(hid_dev->report, usage_path,
    198198            mapping->compare);
    199199        usb_log_debug("Size of the input report: %zuB\n", size);
     
    341341        }
    342342       
    343         hid_dev->parser = (usb_hid_report_t *)(malloc(sizeof(
     343        hid_dev->report = (usb_hid_report_t *)(malloc(sizeof(
    344344            usb_hid_report_t)));
    345         if (hid_dev->parser == NULL) {
     345        if (hid_dev->report == NULL) {
    346346                usb_log_fatal("No memory!\n");
    347347                free(hid_dev);
     
    385385        /* Get the report descriptor and parse it. */
    386386        rc = usb_hid_process_report_descriptor(hid_dev->usb_dev,
    387             hid_dev->parser);
     387            hid_dev->report);
    388388       
    389389        bool fallback = false;
     
    583583
    584584        // destroy the parser
    585         if ((*hid_dev)->parser != NULL) {
    586                 usb_hid_free_report((*hid_dev)->parser);
     585        if ((*hid_dev)->report != NULL) {
     586                usb_hid_free_report((*hid_dev)->report);
    587587        }
    588588
Note: See TracChangeset for help on using the changeset viewer.