Skip to content

Commit 25531d6

Browse files
zhouchuangaodtor
authored andcommitted
Input: cros_ec_keyb - use kobj_to_dev() API
Use kobj_to_dev() API instead of container_of(). Signed-off-by: zhouchuangao <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent aaf3589 commit 25531d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/keyboard/cros_ec_keyb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ static umode_t cros_ec_keyb_attr_is_visible(struct kobject *kobj,
644644
struct attribute *attr,
645645
int n)
646646
{
647-
struct device *dev = container_of(kobj, struct device, kobj);
647+
struct device *dev = kobj_to_dev(kobj);
648648
struct cros_ec_keyb *ckdev = dev_get_drvdata(dev);
649649

650650
if (attr == &dev_attr_function_row_physmap.attr &&

0 commit comments

Comments
 (0)