diff options
-rw-r--r-- | drivers/hid/i2c-hid/i2c-hid.c | 3 | ||||
-rw-r--r-- | drivers/hid/uhid.c | 3 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 3 | ||||
-rw-r--r-- | include/linux/hid.h | 11 | ||||
-rw-r--r-- | net/bluetooth/hidp/core.c | 3 |
5 files changed, 19 insertions, 4 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 046f692fd0a2..77396145d2d0 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c | |||
@@ -780,7 +780,7 @@ static int i2c_hid_power(struct hid_device *hid, int lvl) | |||
780 | return 0; | 780 | return 0; |
781 | } | 781 | } |
782 | 782 | ||
783 | static struct hid_ll_driver i2c_hid_ll_driver = { | 783 | struct hid_ll_driver i2c_hid_ll_driver = { |
784 | .parse = i2c_hid_parse, | 784 | .parse = i2c_hid_parse, |
785 | .start = i2c_hid_start, | 785 | .start = i2c_hid_start, |
786 | .stop = i2c_hid_stop, | 786 | .stop = i2c_hid_stop, |
@@ -790,6 +790,7 @@ static struct hid_ll_driver i2c_hid_ll_driver = { | |||
790 | .output_report = i2c_hid_output_report, | 790 | .output_report = i2c_hid_output_report, |
791 | .raw_request = i2c_hid_raw_request, | 791 | .raw_request = i2c_hid_raw_request, |
792 | }; | 792 | }; |
793 | EXPORT_SYMBOL_GPL(i2c_hid_ll_driver); | ||
793 | 794 | ||
794 | static int i2c_hid_init_irq(struct i2c_client *client) | 795 | static int i2c_hid_init_irq(struct i2c_client *client) |
795 | { | 796 | { |
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, | |||
369 | return uhid_hid_output_raw(hid, buf, count, HID_OUTPUT_REPORT); | 369 | return uhid_hid_output_raw(hid, buf, count, HID_OUTPUT_REPORT); |
370 | } | 370 | } |
371 | 371 | ||
372 | static struct hid_ll_driver uhid_hid_driver = { | 372 | struct hid_ll_driver uhid_hid_driver = { |
373 | .start = uhid_hid_start, | 373 | .start = uhid_hid_start, |
374 | .stop = uhid_hid_stop, | 374 | .stop = uhid_hid_stop, |
375 | .open = uhid_hid_open, | 375 | .open = uhid_hid_open, |
@@ -378,6 +378,7 @@ static struct hid_ll_driver uhid_hid_driver = { | |||
378 | .raw_request = uhid_hid_raw_request, | 378 | .raw_request = uhid_hid_raw_request, |
379 | .output_report = uhid_hid_output_report, | 379 | .output_report = uhid_hid_output_report, |
380 | }; | 380 | }; |
381 | EXPORT_SYMBOL_GPL(uhid_hid_driver); | ||
381 | 382 | ||
382 | #ifdef CONFIG_COMPAT | 383 | #ifdef CONFIG_COMPAT |
383 | 384 | ||
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 76013eb5cb7f..e1047ad0d59b 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -1261,7 +1261,7 @@ static int usbhid_idle(struct hid_device *hid, int report, int idle, | |||
1261 | return hid_set_idle(dev, ifnum, report, idle); | 1261 | return hid_set_idle(dev, ifnum, report, idle); |
1262 | } | 1262 | } |
1263 | 1263 | ||
1264 | static struct hid_ll_driver usb_hid_driver = { | 1264 | struct hid_ll_driver usb_hid_driver = { |
1265 | .parse = usbhid_parse, | 1265 | .parse = usbhid_parse, |
1266 | .start = usbhid_start, | 1266 | .start = usbhid_start, |
1267 | .stop = usbhid_stop, | 1267 | .stop = usbhid_stop, |
@@ -1274,6 +1274,7 @@ static struct hid_ll_driver usb_hid_driver = { | |||
1274 | .output_report = usbhid_output_report, | 1274 | .output_report = usbhid_output_report, |
1275 | .idle = usbhid_idle, | 1275 | .idle = usbhid_idle, |
1276 | }; | 1276 | }; |
1277 | EXPORT_SYMBOL_GPL(usb_hid_driver); | ||
1277 | 1278 | ||
1278 | static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id) | 1279 | static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id) |
1279 | { | 1280 | { |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 5006f9b5d837..3853408daf7f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -777,6 +777,17 @@ struct hid_ll_driver { | |||
777 | int (*idle)(struct hid_device *hdev, int report, int idle, int reqtype); | 777 | int (*idle)(struct hid_device *hdev, int report, int idle, int reqtype); |
778 | }; | 778 | }; |
779 | 779 | ||
780 | extern struct hid_ll_driver i2c_hid_ll_driver; | ||
781 | extern struct hid_ll_driver hidp_hid_driver; | ||
782 | extern struct hid_ll_driver uhid_hid_driver; | ||
783 | extern struct hid_ll_driver usb_hid_driver; | ||
784 | |||
785 | static inline bool hid_is_using_ll_driver(struct hid_device *hdev, | ||
786 | struct hid_ll_driver *driver) | ||
787 | { | ||
788 | return hdev->ll_driver == driver; | ||
789 | } | ||
790 | |||
780 | #define PM_HINT_FULLON 1<<5 | 791 | #define PM_HINT_FULLON 1<<5 |
781 | #define PM_HINT_NORMAL 1<<1 | 792 | #define PM_HINT_NORMAL 1<<1 |
782 | 793 | ||
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 002743ea509c..8112893037bd 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) | |||
734 | hid->claimed = 0; | 734 | hid->claimed = 0; |
735 | } | 735 | } |
736 | 736 | ||
737 | static struct hid_ll_driver hidp_hid_driver = { | 737 | struct hid_ll_driver hidp_hid_driver = { |
738 | .parse = hidp_parse, | 738 | .parse = hidp_parse, |
739 | .start = hidp_start, | 739 | .start = hidp_start, |
740 | .stop = hidp_stop, | 740 | .stop = hidp_stop, |
@@ -743,6 +743,7 @@ static struct hid_ll_driver hidp_hid_driver = { | |||
743 | .raw_request = hidp_raw_request, | 743 | .raw_request = hidp_raw_request, |
744 | .output_report = hidp_output_report, | 744 | .output_report = hidp_output_report, |
745 | }; | 745 | }; |
746 | EXPORT_SYMBOL_GPL(hidp_hid_driver); | ||
746 | 747 | ||
747 | /* This function sets up the hid device. It does not add it | 748 | /* This function sets up the hid device. It does not add it |
748 | to the HID system. That is done in hidp_add_connection(). */ | 749 | to the HID system. That is done in hidp_add_connection(). */ |