summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-wiimote.h
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-27 17:25:21 +0800
committerJiri Kosina <jkosina@suse.cz>2015-12-28 13:41:44 +0100
commitee79a8f840a45d331bc33e55cbcc89bba417671c (patch)
tree9dc3d0fd485715c63999d0aaf339c2a7d26dce3f /drivers/hid/hid-wiimote.h
parentd8ce9bf5551bfea431893bdd0a943f24a5170828 (diff)
HID: use to_hid_device()
Use to_hid_device() instead of container_of(). Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-wiimote.h')
-rw-r--r--drivers/hid/hid-wiimote.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h
index 875694d43e4d..510ca77fe14e 100644
--- a/drivers/hid/hid-wiimote.h
+++ b/drivers/hid/hid-wiimote.h
@@ -256,8 +256,7 @@ enum wiiproto_reqs {
WIIPROTO_REQ_MAX
};
-#define dev_to_wii(pdev) hid_get_drvdata(container_of(pdev, struct hid_device, \
- dev))
+#define dev_to_wii(pdev) hid_get_drvdata(to_hid_device(pdev))
void __wiimote_schedule(struct wiimote_data *wdata);