diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-27 12:25:21 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-12-28 15:41:44 +0300 |
commit | ee79a8f840a45d331bc33e55cbcc89bba417671c (patch) | |
tree | 9dc3d0fd485715c63999d0aaf339c2a7d26dce3f /drivers/hid/hid-multitouch.c | |
parent | d8ce9bf5551bfea431893bdd0a943f24a5170828 (diff) | |
download | linux-ee79a8f840a45d331bc33e55cbcc89bba417671c.tar.xz |
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-multitouch.c')
-rw-r--r-- | drivers/hid/hid-multitouch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 3d664d01305e..96cf7512c338 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -272,7 +272,7 @@ static ssize_t mt_show_quirks(struct device *dev, struct device_attribute *attr, char *buf) { - struct hid_device *hdev = container_of(dev, struct hid_device, dev); + struct hid_device *hdev = to_hid_device(dev); struct mt_device *td = hid_get_drvdata(hdev); return sprintf(buf, "%u\n", td->mtclass.quirks); @@ -282,7 +282,7 @@ static ssize_t mt_set_quirks(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - struct hid_device *hdev = container_of(dev, struct hid_device, dev); + struct hid_device *hdev = to_hid_device(dev); struct mt_device *td = hid_get_drvdata(hdev); unsigned long val; |