summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2017-07-24 09:46:18 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-14 10:03:48 +0100
commitf3d66a74a8b940726671cb315517f3aa7df1d1f6 (patch)
tree550ca9abb42496793affd418dcffe9ddbd2a6071 /net
parent90b74a039f807b3ff911d886afe2645c4522542d (diff)
downloadlinux-stable-f3d66a74a8b940726671cb315517f3aa7df1d1f6.tar.gz
linux-stable-f3d66a74a8b940726671cb315517f3aa7df1d1f6.tar.bz2
linux-stable-f3d66a74a8b940726671cb315517f3aa7df1d1f6.zip
HID: introduce hid_is_using_ll_driver
commit fc2237a724a9e448599076d7d23497f51e2f7441 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hidp/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 9ec37c6c8c4a..00f25e54119c 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -734,7 +734,7 @@ static void hidp_stop(struct hid_device *hid)
hid->claimed = 0;
}
-static struct hid_ll_driver hidp_hid_driver = {
+struct hid_ll_driver hidp_hid_driver = {
.parse = hidp_parse,
.start = hidp_start,
.stop = hidp_stop,
@@ -743,6 +743,7 @@ static struct hid_ll_driver hidp_hid_driver = {
.raw_request = hidp_raw_request,
.output_report = hidp_output_report,
};
+EXPORT_SYMBOL_GPL(hidp_hid_driver);
/* This function sets up the hid device. It does not add it
to the HID system. That is done in hidp_add_connection(). */