diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-27 17:25:24 +0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-12-28 13:41:51 +0100 |
commit | 2cf83833fc9cff04c50e402260b724b3f001d737 (patch) | |
tree | 6e0d76a5c4ab8d408665bacd2699cb9cd304aefb /drivers/hid/hid-core.c | |
parent | d98ba98c4fbff91abb37eef628ccce0c218b4185 (diff) | |
download | lwn-2cf83833fc9cff04c50e402260b724b3f001d737.tar.gz lwn-2cf83833fc9cff04c50e402260b724b3f001d737.zip |
HID: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 9d75205a511e..e847fb7f5d5d 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1571,7 +1571,7 @@ read_report_descriptor(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct hid_device *hdev = to_hid_device(dev); if (off >= hdev->rsize) |