• H
    HID: Handle driver-specific device descriptor in core · a7197c2e
    Henrik Rydberg 提交于
    The low-level driver can read the report descriptor, but it cannot
    determine driver-specific changes to it. The hid core can fixup
    and parse the report descriptor during driver attach, but does
    not have direct access to the descriptor when doing so.
    
    To be able to handle attach/detach of hid drivers properly,
    a semantic change to hid_parse_report() is needed. This function has
    been used in two ways, both as descriptor reader in the ll drivers and
    as a parsor in the probe of the drivers. This patch splits the usage
    by introducing hid_open_report(), and modifies the hid_parse() macro
    to call hid_open_report() instead. The only usage of hid_parse_report()
    is then to read and store the device descriptor. As a consequence, we
    can handle the report fixups automatically inside the hid core.
    Signed-off-by: NHenrik Rydberg <rydberg@euromail.se>
    Tested-by: NNikolai Kondrashov <spbnick@gmail.com>
    Tested-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
    Signed-off-by: NJiri Kosina <jkosina@suse.cz>
    a7197c2e
hid.h 27.4 KB