OSDN Git Service

HID: fix up .raw_event() documentation
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 4 Nov 2018 10:32:47 +0000 (11:32 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 6 Nov 2018 12:59:08 +0000 (13:59 +0100)
commitaa9b760cec2385ad408bb2e346c7f6dc1be69a79
tree73ecac01e157aa816bfa29bfcdc883b33b1049fb
parent3fc202e81db70bf60beb9296eefd4e48d6304607
HID: fix up .raw_event() documentation

The documentation for the .raw_event() callback says that if the
driver return 1, there will be no further processing of the event,
but this is not true, the actual code in hid-core.c looks like this:

  if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
           ret = hdrv->raw_event(hid, report, data, size);
           if (ret < 0)
                   goto unlock;
   }

   ret = hid_report_raw_event(hid, type, data, size, interrupt);

The only return value that has any effect on the processing is
a negative error.

Correct this as it seems to confuse people: I found bogus code in
the Razer out-of-tree driver attempting to return 1 here.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
include/linux/hid.h