diff options
author | Dave Jiang <djiang@mvista.com> | 2007-07-19 04:49:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:54 -0400 |
commit | 66ee2f940ac8ab25f0c43a1e717d25dc46bfe74d (patch) | |
tree | 929e24aefc27c95e13641a8f4052d9093a1ef34a /drivers/edac/edac_mc.c | |
parent | 91b99041c1d577ded1da599ddc28cec2e07253cf (diff) |
drivers/edac: mod assert_error check
Change error check and clear variable from an atomic to an int
Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Douglas Thompson <dougthompson@xmission.com
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r-- | drivers/edac/edac_mc.c | 11 |
1 files changed, 4 insertions, 7 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 | /* |