From ba91a96718d17160890e161f702db6e60747248a Mon Sep 17 00:00:00 2001 From: Geliang Tang Date: Sun, 27 Dec 2015 17:25:22 +0800 Subject: 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 Signed-off-by: Jiri Kosina --- include/linux/hid.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/hid.h') 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 -- cgit v1.2.3