aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i5000_edac.c
diff options
context:
space:
mode:
authorDoug Thompson <dougthompson@xmission.com>2007-07-19 04:50:26 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:57 -0400
commitb8f6f9755248026f21282e25cac49a1af698056c (patch)
treec133319ae70b99d60415aa833719911d47420297 /drivers/edac/i5000_edac.c
parentfd309a9d8e63e9176759d00630b65d772ae06e0c (diff)
drivers/edac: fix edac_mc init apis
Refactoring of sysfs code necessitated the refactoring of the edac_mc_alloc() and edac_mc_add_mc() apis, of moving the index value to the alloc() function. This patch alters the in tree drivers to utilize this new api signature. Having the index value performed later created a chicken-and-the-egg issue. Moving it to the alloc() function allows for creating the necessary sysfs entries with the proper index number Cc: Alan Cox alan@lxorguk.ukuu.org.uk Signed-off-by: Doug Thompson <dougthompson@xmission.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/i5000_edac.c')
-rw-r--r--drivers/edac/i5000_edac.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index d68e8bad6f43..96f7e63e3996 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -338,8 +338,6 @@ struct i5000_pvt {
338 struct pci_dev *branch_0; /* 21.0 */ 338 struct pci_dev *branch_0; /* 21.0 */
339 struct pci_dev *branch_1; /* 22.0 */ 339 struct pci_dev *branch_1; /* 22.0 */
340 340
341 int node_id; /* ID of this node */
342
343 u16 tolm; /* top of low memory */ 341 u16 tolm; /* top of low memory */
344 u64 ambase; /* AMB BAR */ 342 u64 ambase; /* AMB BAR */
345 343
@@ -1319,7 +1317,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
1319 __func__, num_channels, num_dimms_per_channel, num_csrows); 1317 __func__, num_channels, num_dimms_per_channel, num_csrows);
1320 1318
1321 /* allocate a new MC control structure */ 1319 /* allocate a new MC control structure */
1322 mci = edac_mc_alloc(sizeof(*pvt), num_csrows, num_channels); 1320 mci = edac_mc_alloc(sizeof(*pvt), num_csrows, num_channels, 0);
1323 1321
1324 if (mci == NULL) 1322 if (mci == NULL)
1325 return -ENOMEM; 1323 return -ENOMEM;
@@ -1366,7 +1364,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx)
1366 } 1364 }
1367 1365
1368 /* add this new MC control structure to EDAC's list of MCs */ 1366 /* add this new MC control structure to EDAC's list of MCs */
1369 if (edac_mc_add_mc(mci, pvt->node_id)) { 1367 if (edac_mc_add_mc(mci)) {
1370 debugf0("MC: " __FILE__ 1368 debugf0("MC: " __FILE__
1371 ": %s(): failed edac_mc_add_mc()\n", __func__); 1369 ": %s(): failed edac_mc_add_mc()\n", __func__);
1372 /* FIXME: perhaps some code should go here that disables error 1370 /* FIXME: perhaps some code should go here that disables error