Skip to content

Commit c8ad6a7

Browse files
Minghao Chijwrdegoede
authored andcommitted
platform/x86: samsung-laptop: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it. Signed-off-by: Minghao Chi <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent 0ca48a2 commit c8ad6a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/samsung-laptop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ static int __init samsung_backlight_init(struct samsung_laptop *samsung)
12081208
static umode_t samsung_sysfs_is_visible(struct kobject *kobj,
12091209
struct attribute *attr, int idx)
12101210
{
1211-
struct device *dev = container_of(kobj, struct device, kobj);
1211+
struct device *dev = kobj_to_dev(kobj);
12121212
struct samsung_laptop *samsung = dev_get_drvdata(dev);
12131213
bool ok = true;
12141214

0 commit comments

Comments
 (0)