• Jiri Kosina's avatar
    HID: core: fix reporting of raw events · b1a1442a
    Jiri Kosina authored
    hdrw->raw event can return three different return value types:
    
    - ret < 0	indicates that the hdrv driver found an error while parsing
    - ret == 0	indicates no error has been encountered, and the driver has
              	processed the report
    - ret > 0	indicates that there was no parsing error, and the driver hasn't
    		processed the event.
    
    Calling hid_report_raw_event() has to be called appropriately so that it
    reflects what has been done by ->raw_event() callback, otherwise we might
    updates of the in-kernel structure are lost upon arrival of the report, which
    is wrong.
    Reported-and-tested-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Reported-and-tested-by: default avatarDaniel Leung <daniel.leung@linux.intel.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    b1a1442a
hid-core.c 83.4 KB