aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-01 19:40:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-01 19:40:51 -0400
commita2d773023552f68baa2db2226dfd6d761c0df5da (patch)
treec905702c4f318d0e569222187472289c574bde3c /drivers/acpi
parent72f9adfd20e3be8a33ff3ef96cec787ed97b9ba9 (diff)
parent7644c16c7e7431fa398e834109dbb76dc1b51617 (diff)
Merge branch 'pstore-efi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'pstore-efi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: efivars: Introduce PSTORE_EFI_ATTRIBUTES efivars: Use string functions in pstore_write efivars: introduce utf16_strncmp efivars: String functions efi: Add support for using efivars as a pstore backend pstore: Allow the user to explicitly choose a backend pstore: Make "part" unsigned pstore: Add extra context for writes and erases pstore: Extend API for more flexibility in new backends
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/apei/erst.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index e6cef8e1b534..6053f4780df9 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -932,8 +932,11 @@ static int erst_check_table(struct acpi_table_erst *erst_tab)
932static int erst_open_pstore(struct pstore_info *psi); 932static int erst_open_pstore(struct pstore_info *psi);
933static int erst_close_pstore(struct pstore_info *psi); 933static int erst_close_pstore(struct pstore_info *psi);
934static ssize_t erst_reader(u64 *id, enum pstore_type_id *type, 934static ssize_t erst_reader(u64 *id, enum pstore_type_id *type,
935 struct timespec *time); 935 struct timespec *time, struct pstore_info *psi);
936static u64 erst_writer(enum pstore_type_id type, size_t size); 936static u64 erst_writer(enum pstore_type_id type, unsigned int part,
937 size_t size, struct pstore_info *psi);
938static int erst_clearer(enum pstore_type_id type, u64 id,
939 struct pstore_info *psi);
937 940
938static struct pstore_info erst_info = { 941static struct pstore_info erst_info = {
939 .owner = THIS_MODULE, 942 .owner = THIS_MODULE,
@@ -942,7 +945,7 @@ static struct pstore_info erst_info = {
942 .close = erst_close_pstore, 945 .close = erst_close_pstore,
943 .read = erst_reader, 946 .read = erst_reader,
944 .write = erst_writer, 947 .write = erst_writer,
945 .erase = erst_clear 948 .erase = erst_clearer
946}; 949};
947 950
948#define CPER_CREATOR_PSTORE \ 951#define CPER_CREATOR_PSTORE \
@@ -983,7 +986,7 @@ static int erst_close_pstore(struct pstore_info *psi)
983} 986}
984 987
985static ssize_t erst_reader(u64 *id, enum pstore_type_id *type, 988static ssize_t erst_reader(u64 *id, enum pstore_type_id *type,
986 struct timespec *time) 989 struct timespec *time, struct pstore_info *psi)
987{ 990{
988 int rc; 991 int rc;
989 ssize_t len = 0; 992 ssize_t len = 0;
@@ -1037,7 +1040,8 @@ out:
1037 return (rc < 0) ? rc : (len - sizeof(*rcd)); 1040 return (rc < 0) ? rc : (len - sizeof(*rcd));
1038} 1041}
1039 1042
1040static u64 erst_writer(enum pstore_type_id type, size_t size) 1043static u64 erst_writer(enum pstore_type_id type, unsigned int part,
1044 size_t size, struct pstore_info *psi)
1041{ 1045{
1042 struct cper_pstore_record *rcd = (struct cper_pstore_record *) 1046 struct cper_pstore_record *rcd = (struct cper_pstore_record *)
1043 (erst_info.buf - sizeof(*rcd)); 1047 (erst_info.buf - sizeof(*rcd));
@@ -1080,6 +1084,12 @@ static u64 erst_writer(enum pstore_type_id type, size_t size)
1080 return rcd->hdr.record_id; 1084 return rcd->hdr.record_id;
1081} 1085}
1082 1086
1087static int erst_clearer(enum pstore_type_id type, u64 id,
1088 struct pstore_info *psi)
1089{
1090 return erst_clear(id);
1091}
1092
1083static int __init erst_init(void) 1093static int __init erst_init(void)
1084{ 1094{
1085 int rc = 0; 1095 int rc = 0;