diff options
author | YueHaibing <yuehaibing@huawei.com> | 2021-06-19 22:13:29 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-06-19 22:36:26 -0700 |
commit | eacacdb5fc961a7e3aec36502e4cbda8b6d5b3a8 (patch) | |
tree | 6bbb375b56a0bb9ea3721bb484a71a539c57cda2 /drivers/input | |
parent | 50221b0b68a621a4d688ab9e4165a79a2247ad6e (diff) |
Input: trackpoint - use kobj_to_dev()
Use kobj_to_dev() instead of container_of()
Generated by: scripts/coccinelle/api/kobj_to_dev.cocci
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20210607122722.36736-1-yuehaibing@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/mouse/trackpoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c index ef2fa0905208..4a86b3e31d3b 100644 --- a/drivers/input/mouse/trackpoint.c +++ b/drivers/input/mouse/trackpoint.c @@ -214,7 +214,7 @@ static bool trackpoint_is_attr_available(struct psmouse *psmouse, static umode_t trackpoint_is_attr_visible(struct kobject *kobj, struct attribute *attr, int n) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct serio *serio = to_serio_port(dev); struct psmouse *psmouse = serio_get_drvdata(serio); |