Skip to content

Commit eacacdb

Browse files
YueHaibingdtor
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 50221b0 commit eacacdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/mouse/trackpoint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static bool trackpoint_is_attr_available(struct psmouse *psmouse,
214214
static umode_t trackpoint_is_attr_visible(struct kobject *kobj,
215215
struct attribute *attr, int n)
216216
{
217-
struct device *dev = container_of(kobj, struct device, kobj);
217+
struct device *dev = kobj_to_dev(kobj);
218218
struct serio *serio = to_serio_port(dev);
219219
struct psmouse *psmouse = serio_get_drvdata(serio);
220220

0 commit comments

Comments
 (0)