diff options
-rw-r--r-- | drivers/edac/edac_mc.c | 11 | ||||
-rw-r--r-- | drivers/edac/edac_stub.c | 4 | ||||
-rw-r--r-- | include/linux/edac.h | 2 |
3 files changed, 7 insertions, 10 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 3474ca9d90a4..7c952c68f0d6 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
@@ -222,18 +222,15 @@ static struct mem_ctl_info *find_mci_by_dev(struct device *dev) | |||
222 | */ | 222 | */ |
223 | static int edac_mc_assert_error_check_and_clear(void) | 223 | static int edac_mc_assert_error_check_and_clear(void) |
224 | { | 224 | { |
225 | int vreg; | 225 | int old_state; |
226 | 226 | ||
227 | if(edac_op_state == EDAC_OPSTATE_POLL) | 227 | if(edac_op_state == EDAC_OPSTATE_POLL) |
228 | return 1; | 228 | return 1; |
229 | 229 | ||
230 | vreg = atomic_read(&edac_err_assert); | 230 | old_state = edac_err_assert; |
231 | if(vreg) { | 231 | edac_err_assert = 0; |
232 | atomic_set(&edac_err_assert, 0); | ||
233 | return 1; | ||
234 | } | ||
235 | 232 | ||
236 | return 0; | 233 | return old_state; |
237 | } | 234 | } |
238 | 235 | ||
239 | /* | 236 | /* |
diff --git a/drivers/edac/edac_stub.c b/drivers/edac/edac_stub.c index 91a038d2f652..3d259c231507 100644 --- a/drivers/edac/edac_stub.c +++ b/drivers/edac/edac_stub.c | |||
@@ -20,7 +20,7 @@ EXPORT_SYMBOL(edac_op_state); | |||
20 | atomic_t edac_handlers = ATOMIC_INIT(0); | 20 | atomic_t edac_handlers = ATOMIC_INIT(0); |
21 | EXPORT_SYMBOL(edac_handlers); | 21 | EXPORT_SYMBOL(edac_handlers); |
22 | 22 | ||
23 | atomic_t edac_err_assert = ATOMIC_INIT(0); | 23 | int edac_err_assert = 0; |
24 | EXPORT_SYMBOL(edac_err_assert); | 24 | EXPORT_SYMBOL(edac_err_assert); |
25 | 25 | ||
26 | inline int edac_handler_set(void) | 26 | inline int edac_handler_set(void) |
@@ -37,6 +37,6 @@ EXPORT_SYMBOL(edac_handler_set); | |||
37 | */ | 37 | */ |
38 | inline void edac_atomic_assert_error(void) | 38 | inline void edac_atomic_assert_error(void) |
39 | { | 39 | { |
40 | atomic_set(&edac_err_assert, 1); | 40 | edac_err_assert++; |
41 | } | 41 | } |
42 | EXPORT_SYMBOL(edac_atomic_assert_error); | 42 | EXPORT_SYMBOL(edac_atomic_assert_error); |
diff --git a/include/linux/edac.h b/include/linux/edac.h index c8b92d79f884..eab451e69a91 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
@@ -20,8 +20,8 @@ | |||
20 | #define EDAC_OPSTATE_INT 2 | 20 | #define EDAC_OPSTATE_INT 2 |
21 | 21 | ||
22 | extern int edac_op_state; | 22 | extern int edac_op_state; |
23 | extern int edac_err_assert; | ||
23 | extern atomic_t edac_handlers; | 24 | extern atomic_t edac_handlers; |
24 | extern atomic_t edac_err_assert; | ||
25 | 25 | ||
26 | extern int edac_handler_set(void); | 26 | extern int edac_handler_set(void); |
27 | extern void edac_atomic_assert_error(void); | 27 | extern void edac_atomic_assert_error(void); |