diff options
author | Doug Thompson <dougthompson@xmission.com> | 2007-07-19 01:50:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 10:04:57 -0700 |
commit | b8f6f9755248026f21282e25cac49a1af698056c (patch) | |
tree | c133319ae70b99d60415aa833719911d47420297 /drivers/edac/i5000_edac.c | |
parent | fd309a9d8e63e9176759d00630b65d772ae06e0c (diff) | |
download | linux-3.10-b8f6f9755248026f21282e25cac49a1af698056c.tar.gz linux-3.10-b8f6f9755248026f21282e25cac49a1af698056c.tar.bz2 linux-3.10-b8f6f9755248026f21282e25cac49a1af698056c.zip |
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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index d68e8bad6f4..96f7e63e399 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c @@ -338,8 +338,6 @@ struct i5000_pvt { struct pci_dev *branch_0; /* 21.0 */ struct pci_dev *branch_1; /* 22.0 */ - int node_id; /* ID of this node */ - u16 tolm; /* top of low memory */ u64 ambase; /* AMB BAR */ @@ -1319,7 +1317,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) __func__, num_channels, num_dimms_per_channel, num_csrows); /* allocate a new MC control structure */ - mci = edac_mc_alloc(sizeof(*pvt), num_csrows, num_channels); + mci = edac_mc_alloc(sizeof(*pvt), num_csrows, num_channels, 0); if (mci == NULL) return -ENOMEM; @@ -1366,7 +1364,7 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) } /* add this new MC control structure to EDAC's list of MCs */ - if (edac_mc_add_mc(mci, pvt->node_id)) { + if (edac_mc_add_mc(mci)) { debugf0("MC: " __FILE__ ": %s(): failed edac_mc_add_mc()\n", __func__); /* FIXME: perhaps some code should go here that disables error |