diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2021-02-04 00:55:15 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-02-04 12:20:42 +0300 |
commit | 708086b2365bca758f652bb6bff4e56e5bbf9d45 (patch) | |
tree | bb46373061591cc2629170f788a44f322f993d04 /drivers/platform | |
parent | 8782d8d7e8433924b2608ace57c778902c68ecec (diff) | |
download | linux-708086b2365bca758f652bb6bff4e56e5bbf9d45.tar.xz |
platform/x86: ideapad-laptop: use kobj_to_dev()
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/ideapad-laptop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 2153688012c3..30ea97143567 100644 --- 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; |