From b8f6f9755248026f21282e25cac49a1af698056c Mon Sep 17 00:00:00 2001 From: Doug Thompson Date: Thu, 19 Jul 2007 01:50:26 -0700 Subject: 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 Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/edac/pasemi_edac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/edac/pasemi_edac.c') diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c index 4fcf23b61d8..e66cdd42a39 100644 --- a/drivers/edac/pasemi_edac.c +++ b/drivers/edac/pasemi_edac.c @@ -205,7 +205,8 @@ static int __devinit pasemi_edac_probe(struct pci_dev *pdev, MCDEBUG_ERRCTL1_RFL_LOG_EN; pci_write_config_dword(pdev, MCDEBUG_ERRCTL1, errctl1); - mci = edac_mc_alloc(0, PASEMI_EDAC_NR_CSROWS, PASEMI_EDAC_NR_CHANS); + mci = edac_mc_alloc(0, PASEMI_EDAC_NR_CSROWS, PASEMI_EDAC_NR_CHANS, + system_mmc_id++); if (mci == NULL) return -ENOMEM; @@ -245,7 +246,7 @@ static int __devinit pasemi_edac_probe(struct pci_dev *pdev, */ pasemi_edac_get_error_info(mci); - if (edac_mc_add_mc(mci, system_mmc_id++)) + if (edac_mc_add_mc(mci)) goto fail; /* get this far and it's successful */ -- cgit v1.2.3