Commit 25531d61 authored by zhouchuangao's avatar zhouchuangao Committed by Dmitry Torokhov

Input: cros_ec_keyb - use kobj_to_dev() API

Use kobj_to_dev() API instead of container_of().
Signed-off-by: default avatarzhouchuangao <zhouchuangao@vivo.com>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/1624025283-56360-1-git-send-email-zhouchuangao@vivo.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent aaf35899
......@@ -644,7 +644,7 @@ static umode_t cros_ec_keyb_attr_is_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 cros_ec_keyb *ckdev = dev_get_drvdata(dev);
if (attr == &dev_attr_function_row_physmap.attr &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment