mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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>
This commit is contained in:
committed by
Jiri Kosina
parent
0b1804e3d6
commit
d8ce9bf555
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user