diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-27 17:25:20 +0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-12-28 13:41:11 +0100 |
commit | d8ce9bf5551bfea431893bdd0a943f24a5170828 (patch) | |
tree | 5f36d4a6899cde40bdeac14ae5eaa6c046660c03 /include/linux/hid.h | |
parent | 0b1804e3d6ee820303cd07fd5b9579db6110840b (diff) | |
download | op-kernel-dev-d8ce9bf5551bfea431893bdd0a943f24a5170828.zip op-kernel-dev-d8ce9bf5551bfea431893bdd0a943f24a5170828.tar.gz |
HID: move to_hid_device() to hid.h
to_hid_device() macro is defined in both hid-lg4ff.c and
hid-logitech-hidpp.c. So I move it to include/linux/hid.h.
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index a6d7a3f..1472026 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -565,6 +565,9 @@ struct hid_device { /* device report descriptor */ wait_queue_head_t debug_wait; }; +#define to_hid_device(pdev) \ + container_of(pdev, struct hid_device, dev) + static inline void *hid_get_drvdata(struct hid_device *hdev) { return dev_get_drvdata(&hdev->dev); |