summaryrefslogtreecommitdiff
path: root/include/linux/hid.h
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-27 17:25:22 +0800
committerJiri Kosina <jkosina@suse.cz>2015-12-28 13:41:50 +0100
commitba91a96718d17160890e161f702db6e60747248a (patch)
tree6af58c2933d66bbcf4bdb40445ccbe68d2029c95 /include/linux/hid.h
parentee79a8f840a45d331bc33e55cbcc89bba417671c (diff)
HID: add a new helper to_hid_driver()
Add a new helper to_hid_driver() and use it in hid-core.c. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r--include/linux/hid.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 1472026367ed..75b66eccc692 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -717,6 +717,9 @@ struct hid_driver {
struct device_driver driver;
};
+#define to_hid_driver(pdrv) \
+ container_of(pdrv, struct hid_driver, driver)
+
/**
* hid_ll_driver - low level driver callbacks
* @start: called on probe to start the device