summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-05-11 04:15:22 +0200
committerHans de Goede <hdegoede@redhat.com>2022-05-12 15:37:53 +0200
commitc8ad6a768062e0e0aea59ad35bf33cd0a329b03b (patch)
tree40d5a221466812e551889b4dbdd7768f67255e3e /drivers/platform
parentplatform/x86: gigabyte-wmi: Add support for Z490 AORUS ELITE AC and X570 AORU... (diff)
downloadlinux-c8ad6a768062e0e0aea59ad35bf33cd0a329b03b.tar.xz
linux-c8ad6a768062e0e0aea59ad35bf33cd0a329b03b.zip
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')
-rw-r--r--drivers/platform/x86/samsung-laptop.c2
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;