diff options
-rw-r--r-- | fs/pstore/ram_core.c | 10 | ||||
-rw-r--r-- | include/linux/pstore_ram.h | 1 |
2 files changed, 4 insertions, 7 deletions
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 7e5a2a9154ca..4dabbb8e4270 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c | |||
@@ -114,7 +114,7 @@ static void notrace persistent_ram_update_ecc(struct persistent_ram_zone *prz, | |||
114 | int ecc_size = prz->ecc_size; | 114 | int ecc_size = prz->ecc_size; |
115 | int size = prz->ecc_block_size; | 115 | int size = prz->ecc_block_size; |
116 | 116 | ||
117 | if (!prz->ecc) | 117 | if (!prz->ecc_size) |
118 | return; | 118 | return; |
119 | 119 | ||
120 | block = buffer->data + (start & ~(ecc_block_size - 1)); | 120 | block = buffer->data + (start & ~(ecc_block_size - 1)); |
@@ -133,7 +133,7 @@ static void persistent_ram_update_header_ecc(struct persistent_ram_zone *prz) | |||
133 | { | 133 | { |
134 | struct persistent_ram_buffer *buffer = prz->buffer; | 134 | struct persistent_ram_buffer *buffer = prz->buffer; |
135 | 135 | ||
136 | if (!prz->ecc) | 136 | if (!prz->ecc_size) |
137 | return; | 137 | return; |
138 | 138 | ||
139 | persistent_ram_encode_rs8(prz, (uint8_t *)buffer, sizeof(*buffer), | 139 | persistent_ram_encode_rs8(prz, (uint8_t *)buffer, sizeof(*buffer), |
@@ -146,7 +146,7 @@ static void persistent_ram_ecc_old(struct persistent_ram_zone *prz) | |||
146 | uint8_t *block; | 146 | uint8_t *block; |
147 | uint8_t *par; | 147 | uint8_t *par; |
148 | 148 | ||
149 | if (!prz->ecc) | 149 | if (!prz->ecc_size) |
150 | return; | 150 | return; |
151 | 151 | ||
152 | block = buffer->data; | 152 | block = buffer->data; |
@@ -181,7 +181,7 @@ static int persistent_ram_init_ecc(struct persistent_ram_zone *prz, | |||
181 | int ecc_symsize = 8; | 181 | int ecc_symsize = 8; |
182 | int ecc_poly = 0x11d; | 182 | int ecc_poly = 0x11d; |
183 | 183 | ||
184 | if (!prz->ecc) | 184 | if (!ecc_size) |
185 | return 0; | 185 | return 0; |
186 | 186 | ||
187 | prz->ecc_block_size = 128; | 187 | prz->ecc_block_size = 128; |
@@ -395,8 +395,6 @@ static int __devinit persistent_ram_post_init(struct persistent_ram_zone *prz, | |||
395 | { | 395 | { |
396 | int ret; | 396 | int ret; |
397 | 397 | ||
398 | prz->ecc = ecc_size; | ||
399 | |||
400 | ret = persistent_ram_init_ecc(prz, ecc_size); | 398 | ret = persistent_ram_init_ecc(prz, ecc_size); |
401 | if (ret) | 399 | if (ret) |
402 | return ret; | 400 | return ret; |
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index 94b79f173365..dcf805f56bc6 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h | |||
@@ -33,7 +33,6 @@ struct persistent_ram_zone { | |||
33 | size_t buffer_size; | 33 | size_t buffer_size; |
34 | 34 | ||
35 | /* ECC correction */ | 35 | /* ECC correction */ |
36 | bool ecc; | ||
37 | char *par_buffer; | 36 | char *par_buffer; |
38 | char *par_header; | 37 | char *par_header; |
39 | struct rs_control *rs_decoder; | 38 | struct rs_control *rs_decoder; |