diff options
author | Minghao Chi <chi.minghao@zte.com.cn> | 2022-05-11 05:15:22 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-05-12 16:37:53 +0300 |
commit | c8ad6a768062e0e0aea59ad35bf33cd0a329b03b (patch) | |
tree | 40d5a221466812e551889b4dbdd7768f67255e3e /drivers/platform/x86/samsung-laptop.c | |
parent | 0ca48a2e73699d5c62de7760ec60d47d5e351765 (diff) | |
download | linux-c8ad6a768062e0e0aea59ad35bf33cd0a329b03b.tar.xz |
platform/x86: samsung-laptop: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it.
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220511021522.1488373-1-chi.minghao@zte.com.cn
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/samsung-laptop.c')
-rw-r--r-- | drivers/platform/x86/samsung-laptop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 19f6b456234f..c187dcdf82f0 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -1208,7 +1208,7 @@ static int __init samsung_backlight_init(struct samsung_laptop *samsung) static umode_t samsung_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 samsung_laptop *samsung = dev_get_drvdata(dev); bool ok = true; |