diff options
author | Jason Gerecke <killertofu@gmail.com> | 2017-07-24 19:46:18 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-07-27 16:14:28 +0300 |
commit | fc2237a724a9e448599076d7d23497f51e2f7441 (patch) | |
tree | 0f6fc077d1452bba1d2e690d08f6bef622f20919 /drivers/hid/uhid.c | |
parent | bc35f73aa62f51b80f769d3a6617f4a4ba11d81e (diff) | |
download | linux-fc2237a724a9e448599076d7d23497f51e2f7441.tar.xz |
HID: introduce hid_is_using_ll_driver
Although HID itself is transport-agnostic, occasionally a driver may
want to interact with the low-level transport that a device is connected
through. To do this, we need to know what kind of bus is in use. The
first guess may be to look at the 'bus' field of the 'struct hid_device',
but this field may be emulated in some cases (e.g. uhid).
More ideally, we can check which ll_driver a device is using. This
function introduces a 'hid_is_using_ll_driver' function and makes the
'struct hid_ll_driver' of the four most common transports accessible
through hid.h.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Acked-By: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/uhid.c')
-rw-r--r-- | drivers/hid/uhid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 7f8ff39ed44b..6f819f144cb4 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c @@ -369,7 +369,7 @@ static int uhid_hid_output_report(struct hid_device *hid, __u8 *buf, return uhid_hid_output_raw(hid, buf, count, HID_OUTPUT_REPORT); } -static struct hid_ll_driver uhid_hid_driver = { +struct hid_ll_driver uhid_hid_driver = { .start = uhid_hid_start, .stop = uhid_hid_stop, .open = uhid_hid_open, @@ -378,6 +378,7 @@ static struct hid_ll_driver uhid_hid_driver = { .raw_request = uhid_hid_raw_request, .output_report = uhid_hid_output_report, }; +EXPORT_SYMBOL_GPL(uhid_hid_driver); #ifdef CONFIG_COMPAT |