projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8782d8d
)
platform/x86: ideapad-laptop: use kobj_to_dev()
author
Barnabás Pőcze
<pobrn@protonmail.com>
Wed, 3 Feb 2021 21:55:15 +0000
(21:55 +0000)
committer
Hans de Goede
<hdegoede@redhat.com>
Thu, 4 Feb 2021 09:20:42 +0000
(10:20 +0100)
Use kobj_to_dev() instead of open-coding the container_of() macro.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link:
https://lore.kernel.org/r/20210203215403.290792-9-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/ideapad-laptop.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/ideapad-laptop.c
b/drivers/platform/x86/ideapad-laptop.c
index 2153688012c309aafcfe45da6ad13c1e1872dd61..30ea9714356781703dc45866ffd7379f578b0351 100644
(file)
--- a/
drivers/platform/x86/ideapad-laptop.c
+++ b/
drivers/platform/x86/ideapad-laptop.c
@@
-547,7
+547,7
@@
static umode_t ideapad_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 ideapad_private *priv = dev_get_drvdata(dev);
bool supported;