mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
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>
This commit is contained in:
parent
04cdaf6d8f
commit
70505a71d8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue