summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/asus-laptop.c
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2021-03-17 13:00:26 +0100
committerHans de Goede <hdegoede@redhat.com>2021-03-23 21:06:10 +0100
commit70505a71d845a3ee5e011577fc5d9ac82e5c052a (patch)
treedd0feb73011ea2a6e2e3efb4d8cf05932ff41301 /drivers/platform/x86/asus-laptop.c
parentplatform/mellanox: Typo fix in the file mlxbf-bootctl.c (diff)
downloadlinux-70505a71d845a3ee5e011577fc5d9ac82e5c052a.tar.xz
linux-70505a71d845a3ee5e011577fc5d9ac82e5c052a.zip
platform/x86: asus-laptop: fix kobj_to_dev.cocci warnings
Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci CC: Denis Efremov <efremov@linux.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr> Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2103171258010.2981@hadrien Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/asus-laptop.c')
-rw-r--r--drivers/platform/x86/asus-laptop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index bfea656e910c..4d2d32bfbe2a 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -1569,7 +1569,7 @@ static umode_t asus_sysfs_is_visible(struct kobject *kobj,
struct attribute *attr,
int idx)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct asus_laptop *asus = dev_get_drvdata(dev);
acpi_handle handle = asus->handle;
bool supported;