Skip to content

Commit 50221b0

Browse files
YueHaibingdtor
authored andcommitted
Input: atkbd - 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 6ffd4c7 commit 50221b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/keyboard/atkbd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ static ssize_t atkbd_show_function_row_physmap(struct atkbd *atkbd, char *buf)
324324
static umode_t atkbd_attr_is_visible(struct kobject *kobj,
325325
struct attribute *attr, int i)
326326
{
327-
struct device *dev = container_of(kobj, struct device, kobj);
327+
struct device *dev = kobj_to_dev(kobj);
328328
struct serio *serio = to_serio_port(dev);
329329
struct atkbd *atkbd = serio_get_drvdata(serio);
330330

0 commit comments

Comments
 (0)