From 66ee2f940ac8ab25f0c43a1e717d25dc46bfe74d Mon Sep 17 00:00:00 2001 From: Dave Jiang Date: Thu, 19 Jul 2007 01:49:54 -0700 Subject: drivers/edac: mod assert_error check Change error check and clear variable from an atomic to an int Signed-off-by: Dave Jiang Signed-off-by: Douglas Thompson Signed-off-by: Linus Torvalds --- drivers/edac/edac_mc.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'drivers/edac/edac_mc.c') 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) */ static int edac_mc_assert_error_check_and_clear(void) { - int vreg; + int old_state; if(edac_op_state == EDAC_OPSTATE_POLL) return 1; - vreg = atomic_read(&edac_err_assert); - if(vreg) { - atomic_set(&edac_err_assert, 0); - return 1; - } + old_state = edac_err_assert; + edac_err_assert = 0; - return 0; + return old_state; } /* -- cgit v1.2.3