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>
This commit is contained in:

committed by
Linus Torvalds

parent
fd309a9d8e
commit
b8f6f97552
@@ -309,7 +309,7 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
|
||||
*/
|
||||
interleaved = i3000_is_interleaved(c0dra, c1dra, c0drb, c1drb);
|
||||
nr_channels = interleaved ? 2 : 1;
|
||||
mci = edac_mc_alloc(0, I3000_RANKS / nr_channels, nr_channels);
|
||||
mci = edac_mc_alloc(0, I3000_RANKS / nr_channels, nr_channels, 0);
|
||||
if (!mci)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -370,7 +370,7 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
|
||||
I3000_ERRSTS_BITS);
|
||||
|
||||
rc = -ENODEV;
|
||||
if (edac_mc_add_mc(mci, 0)) {
|
||||
if (edac_mc_add_mc(mci)) {
|
||||
debugf3("MC: %s(): failed edac_mc_add_mc()\n", __func__);
|
||||
goto fail;
|
||||
}
|
||||
|
Reference in New Issue
Block a user