aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i82875p_edac.c
diff options
context:
space:
mode:
authorDave Peterson <dsp@llnl.gov>2006-03-26 04:38:45 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:07 -0500
commit749ede57443b2a7ede2db105145f21047efcea6a (patch)
tree0d0ee972f55e8fbb9d8fba6209a6304fdd3c98f1 /drivers/edac/i82875p_edac.c
parentd38fde84f7521973fdfa5c3d03d62f014b42cd03 (diff)
[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/i82875p_edac.c')
-rw-r--r--drivers/edac/i82875p_edac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index c521178183de..40ba2be6169a 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -286,6 +286,7 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
286 u32 drc_chan; /* Number of channels 0=1chan,1=2chan */ 286 u32 drc_chan; /* Number of channels 0=1chan,1=2chan */
287 u32 nr_chans; 287 u32 nr_chans;
288 u32 drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ 288 u32 drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */
289 struct i82875p_error_info discard;
289 290
290 debugf0("%s()\n", __func__); 291 debugf0("%s()\n", __func__);
291 292
@@ -397,8 +398,7 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
397 csrow->edac_mode = drc_ddim ? EDAC_SECDED : EDAC_NONE; 398 csrow->edac_mode = drc_ddim ? EDAC_SECDED : EDAC_NONE;
398 } 399 }
399 400
400 /* clear counters */ 401 i82875p_get_error_info(mci, &discard); /* clear counters */
401 pci_write_bits16(mci->pdev, I82875P_ERRSTS, 0x0081, 0x0081);
402 402
403 if (edac_mc_add_mc(mci)) { 403 if (edac_mc_add_mc(mci)) {
404 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 404 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);