summaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd76x_edac.c
diff options
context:
space:
mode:
authorDave Peterson <dsp@llnl.gov>2006-03-26 01:38:45 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 08:57:07 -0800
commit749ede57443b2a7ede2db105145f21047efcea6a (patch)
tree0d0ee972f55e8fbb9d8fba6209a6304fdd3c98f1 /drivers/edac/amd76x_edac.c
parentd38fde84f7521973fdfa5c3d03d62f014b42cd03 (diff)
downloadlinux-749ede57443b2a7ede2db105145f21047efcea6a.tar.bz2
[PATCH] EDAC: cleanup code for clearing initial errors
Fix xxx_probe1() functions so they call xxx_get_error_info() functions to clear initial errors. This is simpler and cleaner than duplicating the low-level code for accessing PCI config space. Signed-off-by: David S. Peterson <dsp@llnl.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/edac/amd76x_edac.c')
-rw-r--r--drivers/edac/amd76x_edac.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
index 6b7a441f0482..821c252d414c 100644
--- a/drivers/edac/amd76x_edac.c
+++ b/drivers/edac/amd76x_edac.c
@@ -211,6 +211,7 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
};
u32 ems;
u32 ems_mode;
+ struct amd76x_error_info discard;
debugf0("%s()\n", __func__);
@@ -270,9 +271,7 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
csrow->edac_mode = ems_modes[ems_mode];
}
- /* clear counters */
- pci_write_bits32(mci->pdev, AMD76X_ECC_MODE_STATUS, (u32) (0x3 << 8),
- (u32) (0x3 << 8));
+ amd76x_get_error_info(mci, &discard); /* clear counters */
if (edac_mc_add_mc(mci)) {
debugf3("%s(): failed edac_mc_add_mc()\n", __func__);