efivars: Use to_efivar_entry
authorGeliang Tang <geliangtang@163.com>
Mon, 1 Feb 2016 22:07:02 +0000 (22:07 +0000)
committerIngo Molnar <mingo@kernel.org>
Wed, 3 Feb 2016 10:41:19 +0000 (11:41 +0100)
Use to_efivar_entry() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Link: http://lkml.kernel.org/r/1454364428-494-9-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/firmware/efi/efivars.c

index 756eca8c4cf8f291025a3ad44f7cbb9981aeb5fd..c5b0d2bc1111e4fd62f9164b6f02170ef1ea56c9 100644 (file)
@@ -386,7 +386,7 @@ static const struct sysfs_ops efivar_attr_ops = {
 
 static void efivar_release(struct kobject *kobj)
 {
-       struct efivar_entry *var = container_of(kobj, struct efivar_entry, kobj);
+       struct efivar_entry *var = to_efivar_entry(kobj);
        kfree(var);
 }