diff options
| author | Geliang Tang <[email protected]> | 2015-12-27 09:25:21 +0000 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2015-12-28 12:41:44 +0000 |
| commit | ee79a8f840a45d331bc33e55cbcc89bba417671c (patch) | |
| tree | 9dc3d0fd485715c63999d0aaf339c2a7d26dce3f /drivers/hid/hid-multitouch.c | |
| parent | HID: move to_hid_device() to hid.h (diff) | |
| download | kernel-ee79a8f840a45d331bc33e55cbcc89bba417671c.tar.gz kernel-ee79a8f840a45d331bc33e55cbcc89bba417671c.zip | |
HID: use to_hid_device()
Use to_hid_device() instead of container_of().
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
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; |
