aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hid/hid-lg4ff.c2
-rw-r--r--drivers/hid/hid-logitech-hidpp.c2
-rw-r--r--include/linux/hid.h3
3 files changed, 3 insertions, 4 deletions
diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
index fbddcb37ae98..3e160ff5f218 100644
--- a/drivers/hid/hid-lg4ff.c
+++ b/drivers/hid/hid-lg4ff.c
@@ -33,8 +33,6 @@
33#include "hid-lg4ff.h" 33#include "hid-lg4ff.h"
34#include "hid-ids.h" 34#include "hid-ids.h"
35 35
36#define to_hid_device(pdev) container_of(pdev, struct hid_device, dev)
37
38#define LG4FF_MMODE_IS_MULTIMODE 0 36#define LG4FF_MMODE_IS_MULTIMODE 0
39#define LG4FF_MMODE_SWITCHED 1 37#define LG4FF_MMODE_SWITCHED 1
40#define LG4FF_MMODE_NOT_MULTIMODE 2 38#define LG4FF_MMODE_NOT_MULTIMODE 2
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index f2a481125522..bd2ab476c65e 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -1310,8 +1310,6 @@ struct g920_private_data {
1310 u16 range; 1310 u16 range;
1311}; 1311};
1312 1312
1313#define to_hid_device(pdev) container_of(pdev, struct hid_device, dev)
1314
1315static ssize_t g920_range_show(struct device *dev, struct device_attribute *attr, 1313static ssize_t g920_range_show(struct device *dev, struct device_attribute *attr,
1316 char *buf) 1314 char *buf)
1317{ 1315{
diff --git a/include/linux/hid.h b/include/linux/hid.h
index a6d7a3fc2cb3..1472026367ed 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -565,6 +565,9 @@ struct hid_device { /* device report descriptor */
565 wait_queue_head_t debug_wait; 565 wait_queue_head_t debug_wait;
566}; 566};
567 567
568#define to_hid_device(pdev) \
569 container_of(pdev, struct hid_device, dev)
570
568static inline void *hid_get_drvdata(struct hid_device *hdev) 571static inline void *hid_get_drvdata(struct hid_device *hdev)
569{ 572{
570 return dev_get_drvdata(&hdev->dev); 573 return dev_get_drvdata(&hdev->dev);