Skip to content

Commit 46ecf72

Browse files
Minghao Chijwrdegoede
authored andcommitted
platform/x86: toshiba_acpi: 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/20220511021638.1488650-1-chi.minghao@zte.com.cn Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent c8ad6a7 commit 46ecf72

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/platform/x86/toshiba_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2353,7 +2353,7 @@ static struct attribute *toshiba_attributes[] = {
23532353
static umode_t toshiba_sysfs_is_visible(struct kobject *kobj,
23542354
struct attribute *attr, int idx)
23552355
{
2356-
struct device *dev = container_of(kobj, struct device, kobj);
2356+
struct device *dev = kobj_to_dev(kobj);
23572357
struct toshiba_acpi_dev *drv = dev_get_drvdata(dev);
23582358
bool exists = true;
23592359

0 commit comments

Comments
 (0)