summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorMike Waychison <mikew@google.com>2011-07-21 22:58:00 +0200
committerTony Luck <tony.luck@intel.com>2011-07-23 01:15:49 +0200
commit7644c16c7e7431fa398e834109dbb76dc1b51617 (patch)
tree3894d6375aa32ecb9c538f33db523ad6801ebad9 /drivers/firmware
parentefivars: Use string functions in pstore_write (diff)
downloadlinux-7644c16c7e7431fa398e834109dbb76dc1b51617.tar.xz
linux-7644c16c7e7431fa398e834109dbb76dc1b51617.zip
efivars: Introduce PSTORE_EFI_ATTRIBUTES
Consolidate the attributes listed for pstore operations in one place, PSTORE_EFI_ATTRIBUTES. Signed-off-by: Mike Waychison <mikew@google.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/efivars.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 563492e4d5cf..eacb05e6cfb3 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -122,6 +122,10 @@ struct efivar_attribute {
ssize_t (*store)(struct efivar_entry *entry, const char *buf, size_t count);
};
+#define PSTORE_EFI_ATTRIBUTES \
+ (EFI_VARIABLE_NON_VOLATILE | \
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | \
+ EFI_VARIABLE_RUNTIME_ACCESS)
#define EFIVAR_ATTR(_name, _mode, _show, _store) \
struct efivar_attribute efivar_attr_##_name = { \
@@ -523,8 +527,9 @@ static u64 efi_pstore_write(enum pstore_type_id type, unsigned int part,
/* found */
found = entry;
- efivars->ops->set_variable(entry->var.VariableName, &entry->var.VendorGuid,
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ efivars->ops->set_variable(entry->var.VariableName,
+ &entry->var.VendorGuid,
+ PSTORE_EFI_ATTRIBUTES,
0, NULL);
}
@@ -534,8 +539,7 @@ static u64 efi_pstore_write(enum pstore_type_id type, unsigned int part,
for (i = 0; i < DUMP_NAME_LEN; i++)
efi_name[i] = name[i];
- efivars->ops->set_variable(efi_name, &vendor,
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ efivars->ops->set_variable(efi_name, &vendor, PSTORE_EFI_ATTRIBUTES,
size, psi->buf);
spin_unlock(&efivars->lock);