diff options
author | Mike Waychison <mikew@google.com> | 2011-07-21 16:58:00 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2011-07-22 19:15:49 -0400 |
commit | 7644c16c7e7431fa398e834109dbb76dc1b51617 (patch) | |
tree | 3894d6375aa32ecb9c538f33db523ad6801ebad9 /drivers/firmware | |
parent | c475594d838c5c872e734f693a700df8c01b39d4 (diff) |
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.c | 12 |
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 { | |||
122 | ssize_t (*store)(struct efivar_entry *entry, const char *buf, size_t count); | 122 | ssize_t (*store)(struct efivar_entry *entry, const char *buf, size_t count); |
123 | }; | 123 | }; |
124 | 124 | ||
125 | #define PSTORE_EFI_ATTRIBUTES \ | ||
126 | (EFI_VARIABLE_NON_VOLATILE | \ | ||
127 | EFI_VARIABLE_BOOTSERVICE_ACCESS | \ | ||
128 | EFI_VARIABLE_RUNTIME_ACCESS) | ||
125 | 129 | ||
126 | #define EFIVAR_ATTR(_name, _mode, _show, _store) \ | 130 | #define EFIVAR_ATTR(_name, _mode, _show, _store) \ |
127 | struct efivar_attribute efivar_attr_##_name = { \ | 131 | struct efivar_attribute efivar_attr_##_name = { \ |
@@ -523,8 +527,9 @@ static u64 efi_pstore_write(enum pstore_type_id type, unsigned int part, | |||
523 | 527 | ||
524 | /* found */ | 528 | /* found */ |
525 | found = entry; | 529 | found = entry; |
526 | efivars->ops->set_variable(entry->var.VariableName, &entry->var.VendorGuid, | 530 | efivars->ops->set_variable(entry->var.VariableName, |
527 | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, | 531 | &entry->var.VendorGuid, |
532 | PSTORE_EFI_ATTRIBUTES, | ||
528 | 0, NULL); | 533 | 0, NULL); |
529 | } | 534 | } |
530 | 535 | ||
@@ -534,8 +539,7 @@ static u64 efi_pstore_write(enum pstore_type_id type, unsigned int part, | |||
534 | for (i = 0; i < DUMP_NAME_LEN; i++) | 539 | for (i = 0; i < DUMP_NAME_LEN; i++) |
535 | efi_name[i] = name[i]; | 540 | efi_name[i] = name[i]; |
536 | 541 | ||
537 | efivars->ops->set_variable(efi_name, &vendor, | 542 | efivars->ops->set_variable(efi_name, &vendor, PSTORE_EFI_ATTRIBUTES, |
538 | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, | ||
539 | size, psi->buf); | 543 | size, psi->buf); |
540 | 544 | ||
541 | spin_unlock(&efivars->lock); | 545 | spin_unlock(&efivars->lock); |