aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
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
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')
-rw-r--r--drivers/edac/amd76x_edac.c4
-rw-r--r--drivers/edac/e752x_edac.c4
-rw-r--r--drivers/edac/e7xxx_edac.c4
-rw-r--r--drivers/edac/edac_core.h27
-rw-r--r--drivers/edac/edac_mc.c9
-rw-r--r--drivers/edac/i3000_edac.c4
-rw-r--r--drivers/edac/i5000_edac.c6
-rw-r--r--drivers/edac/i82443bxgx_edac.c4
-rw-r--r--drivers/edac/i82860_edac.c4
-rw-r--r--drivers/edac/i82875p_edac.c4
-rw-r--r--drivers/edac/pasemi_edac.c5
-rw-r--r--drivers/edac/r82600_edac.c4
12 files changed, 40 insertions, 39 deletions
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
index 1c1e02e59585..f22075410591 100644
--- a/drivers/edac/amd76x_edac.c
+++ b/drivers/edac/amd76x_edac.c
@@ -238,7 +238,7 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
238 debugf0("%s()\n", __func__); 238 debugf0("%s()\n", __func__);
239 pci_read_config_dword(pdev, AMD76X_ECC_MODE_STATUS, &ems); 239 pci_read_config_dword(pdev, AMD76X_ECC_MODE_STATUS, &ems);
240 ems_mode = (ems >> 10) & 0x3; 240 ems_mode = (ems >> 10) & 0x3;
241 mci = edac_mc_alloc(0, AMD76X_NR_CSROWS, AMD76X_NR_CHANS); 241 mci = edac_mc_alloc(0, AMD76X_NR_CSROWS, AMD76X_NR_CHANS, 0);
242 242
243 if (mci == NULL) { 243 if (mci == NULL) {
244 return -ENOMEM; 244 return -ENOMEM;
@@ -263,7 +263,7 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
263 /* Here we assume that we will never see multiple instances of this 263 /* Here we assume that we will never see multiple instances of this
264 * type of memory controller. The ID is therefore hardcoded to 0. 264 * type of memory controller. The ID is therefore hardcoded to 0.
265 */ 265 */
266 if (edac_mc_add_mc(mci, 0)) { 266 if (edac_mc_add_mc(mci)) {
267 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 267 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
268 goto fail; 268 goto fail;
269 } 269 }
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index f5168a593e93..3bba224cb55d 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -977,7 +977,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
977 /* Dual channel = 1, Single channel = 0 */ 977 /* Dual channel = 1, Single channel = 0 */
978 drc_chan = dual_channel_active(ddrcsr); 978 drc_chan = dual_channel_active(ddrcsr);
979 979
980 mci = edac_mc_alloc(sizeof(*pvt), E752X_NR_CSROWS, drc_chan + 1); 980 mci = edac_mc_alloc(sizeof(*pvt), E752X_NR_CSROWS, drc_chan + 1, 0);
981 981
982 if (mci == NULL) { 982 if (mci == NULL) {
983 return -ENOMEM; 983 return -ENOMEM;
@@ -1035,7 +1035,7 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
1035 /* Here we assume that we will never see multiple instances of this 1035 /* Here we assume that we will never see multiple instances of this
1036 * type of memory controller. The ID is therefore hardcoded to 0. 1036 * type of memory controller. The ID is therefore hardcoded to 0.
1037 */ 1037 */
1038 if (edac_mc_add_mc(mci, 0)) { 1038 if (edac_mc_add_mc(mci)) {
1039 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 1039 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
1040 goto fail; 1040 goto fail;
1041 } 1041 }
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index 0601958421fb..96ecc4926641 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -427,7 +427,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
427 pci_read_config_dword(pdev, E7XXX_DRC, &drc); 427 pci_read_config_dword(pdev, E7XXX_DRC, &drc);
428 428
429 drc_chan = dual_channel_active(drc, dev_idx); 429 drc_chan = dual_channel_active(drc, dev_idx);
430 mci = edac_mc_alloc(sizeof(*pvt), E7XXX_NR_CSROWS, drc_chan + 1); 430 mci = edac_mc_alloc(sizeof(*pvt), E7XXX_NR_CSROWS, drc_chan + 1, 0);
431 431
432 if (mci == NULL) 432 if (mci == NULL)
433 return -ENOMEM; 433 return -ENOMEM;
@@ -478,7 +478,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
478 /* Here we assume that we will never see multiple instances of this 478 /* Here we assume that we will never see multiple instances of this
479 * type of memory controller. The ID is therefore hardcoded to 0. 479 * type of memory controller. The ID is therefore hardcoded to 0.
480 */ 480 */
481 if (edac_mc_add_mc(mci, 0)) { 481 if (edac_mc_add_mc(mci)) {
482 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 482 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
483 goto fail1; 483 goto fail1;
484 } 484 }
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h
index fca1990945a9..63691cf3a1d6 100644
--- a/drivers/edac/edac_core.h
+++ b/drivers/edac/edac_core.h
@@ -765,8 +765,11 @@ static inline void pci_write_bits32(struct pci_dev *pdev, int offset,
765 765
766#endif /* CONFIG_PCI */ 766#endif /* CONFIG_PCI */
767 767
768extern struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
769 unsigned nr_chans, int edac_index);
770extern int edac_mc_add_mc(struct mem_ctl_info *mci);
771extern void edac_mc_free(struct mem_ctl_info *mci);
768extern struct mem_ctl_info *edac_mc_find(int idx); 772extern struct mem_ctl_info *edac_mc_find(int idx);
769extern int edac_mc_add_mc(struct mem_ctl_info *mci, int mc_idx);
770extern struct mem_ctl_info *edac_mc_del_mc(struct device *dev); 773extern struct mem_ctl_info *edac_mc_del_mc(struct device *dev);
771extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, 774extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci,
772 unsigned long page); 775 unsigned long page);
@@ -803,33 +806,31 @@ extern void edac_mc_handle_fbd_ce(struct mem_ctl_info *mci, unsigned int csrow,
803/* 806/*
804 * edac_device APIs 807 * edac_device APIs
805 */ 808 */
806extern struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
807 unsigned nr_chans);
808extern void edac_mc_free(struct mem_ctl_info *mci);
809extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev, 809extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev,
810 int edac_idx); 810 int dev_idx);
811extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev); 811extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev);
812extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, 812extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
813 int inst_nr, int block_nr, const char *msg); 813 int inst_nr, int block_nr, const char *msg);
814extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, 814extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
815 int inst_nr, int block_nr, const char *msg); 815 int inst_nr, int block_nr, const char *msg);
816 816
817/* 817/*
818 * edac_pci APIs 818 * edac_pci APIs
819 */ 819 */
820extern struct edac_pci_ctl_info *edac_pci_alloc_ctl_info(unsigned int sz_pvt, const char 820extern struct edac_pci_ctl_info *edac_pci_alloc_ctl_info(unsigned int sz_pvt,
821 *edac_pci_name); 821 const char *edac_pci_name);
822 822
823extern void edac_pci_free_ctl_info(struct edac_pci_ctl_info *pci); 823extern void edac_pci_free_ctl_info(struct edac_pci_ctl_info *pci);
824 824
825extern void 825extern void edac_pci_reset_delay_period(struct edac_pci_ctl_info *pci,
826edac_pci_reset_delay_period(struct edac_pci_ctl_info *pci, unsigned long value); 826 unsigned long value);
827 827
828extern int edac_pci_add_device(struct edac_pci_ctl_info *pci, int edac_idx); 828extern int edac_pci_add_device(struct edac_pci_ctl_info *pci, int edac_idx);
829extern struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev); 829extern struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev);
830 830
831extern struct edac_pci_ctl_info *edac_pci_create_generic_ctl(struct device *dev, const char 831extern struct edac_pci_ctl_info *edac_pci_create_generic_ctl(
832 *mod_name); 832 struct device *dev,
833 const char *mod_name);
833 834
834extern void edac_pci_release_generic_ctl(struct edac_pci_ctl_info *pci); 835extern void edac_pci_release_generic_ctl(struct edac_pci_ctl_info *pci);
835extern int edac_pci_create_sysfs(struct edac_pci_ctl_info *pci); 836extern int edac_pci_create_sysfs(struct edac_pci_ctl_info *pci);
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 856860314789..6e4c94e9654a 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -129,7 +129,7 @@ void *edac_align_ptr(void *ptr, unsigned size)
129 * struct mem_ctl_info pointer 129 * struct mem_ctl_info pointer
130 */ 130 */
131struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows, 131struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
132 unsigned nr_chans) 132 unsigned nr_chans, int edac_index)
133{ 133{
134 struct mem_ctl_info *mci; 134 struct mem_ctl_info *mci;
135 struct csrow_info *csi, *csrow; 135 struct csrow_info *csi, *csrow;
@@ -159,7 +159,8 @@ struct mem_ctl_info *edac_mc_alloc(unsigned sz_pvt, unsigned nr_csrows,
159 chi = (struct channel_info *)(((char *)mci) + ((unsigned long)chi)); 159 chi = (struct channel_info *)(((char *)mci) + ((unsigned long)chi));
160 pvt = sz_pvt ? (((char *)mci) + ((unsigned long)pvt)) : NULL; 160 pvt = sz_pvt ? (((char *)mci) + ((unsigned long)pvt)) : NULL;
161 161
162 memset(mci, 0, size); /* clear all fields */ 162 /* setup index and various internal pointers */
163 mci->mc_idx = edac_index;
163 mci->csrows = csi; 164 mci->csrows = csi;
164 mci->pvt_info = pvt; 165 mci->pvt_info = pvt;
165 mci->nr_csrows = nr_csrows; 166 mci->nr_csrows = nr_csrows;
@@ -405,10 +406,10 @@ EXPORT_SYMBOL(edac_mc_find);
405 */ 406 */
406 407
407/* FIXME - should a warning be printed if no error detection? correction? */ 408/* FIXME - should a warning be printed if no error detection? correction? */
408int edac_mc_add_mc(struct mem_ctl_info *mci, int mc_idx) 409int edac_mc_add_mc(struct mem_ctl_info *mci)
409{ 410{
410 debugf0("%s()\n", __func__); 411 debugf0("%s()\n", __func__);
411 mci->mc_idx = mc_idx; 412
412#ifdef CONFIG_EDAC_DEBUG 413#ifdef CONFIG_EDAC_DEBUG
413 if (edac_debug_level >= 3) 414 if (edac_debug_level >= 3)
414 edac_mc_dump_mci(mci); 415 edac_mc_dump_mci(mci);
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c
index 02cd25a15fd4..0ecfdc432f87 100644
--- a/drivers/edac/i3000_edac.c
+++ b/drivers/edac/i3000_edac.c
@@ -309,7 +309,7 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
309 */ 309 */
310 interleaved = i3000_is_interleaved(c0dra, c1dra, c0drb, c1drb); 310 interleaved = i3000_is_interleaved(c0dra, c1dra, c0drb, c1drb);
311 nr_channels = interleaved ? 2 : 1; 311 nr_channels = interleaved ? 2 : 1;
312 mci = edac_mc_alloc(0, I3000_RANKS / nr_channels, nr_channels); 312 mci = edac_mc_alloc(0, I3000_RANKS / nr_channels, nr_channels, 0);
313 if (!mci) 313 if (!mci)
314 return -ENOMEM; 314 return -ENOMEM;
315 315
@@ -370,7 +370,7 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
370 I3000_ERRSTS_BITS); 370 I3000_ERRSTS_BITS);
371 371
372 rc = -ENODEV; 372 rc = -ENODEV;
373 if (edac_mc_add_mc(mci, 0)) { 373 if (edac_mc_add_mc(mci)) {
374 debugf3("MC: %s(): failed edac_mc_add_mc()\n", __func__); 374 debugf3("MC: %s(): failed edac_mc_add_mc()\n", __func__);
375 goto fail; 375 goto fail;
376 } 376 }
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
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c
index 445ed56558f1..83bfe37c4bbb 100644
--- a/drivers/edac/i82443bxgx_edac.c
+++ b/drivers/edac/i82443bxgx_edac.c
@@ -239,7 +239,7 @@ static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx)
239 if (pci_read_config_dword(pdev, I82443BXGX_NBXCFG, &nbxcfg)) 239 if (pci_read_config_dword(pdev, I82443BXGX_NBXCFG, &nbxcfg))
240 return -EIO; 240 return -EIO;
241 241
242 mci = edac_mc_alloc(0, I82443BXGX_NR_CSROWS, I82443BXGX_NR_CHANS); 242 mci = edac_mc_alloc(0, I82443BXGX_NR_CSROWS, I82443BXGX_NR_CHANS, 0);
243 243
244 if (mci == NULL) 244 if (mci == NULL)
245 return -ENOMEM; 245 return -ENOMEM;
@@ -314,7 +314,7 @@ static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx)
314 mci->edac_check = i82443bxgx_edacmc_check; 314 mci->edac_check = i82443bxgx_edacmc_check;
315 mci->ctl_page_to_phys = NULL; 315 mci->ctl_page_to_phys = NULL;
316 316
317 if (edac_mc_add_mc(mci, 0)) { 317 if (edac_mc_add_mc(mci)) {
318 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 318 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
319 goto fail; 319 goto fail;
320 } 320 }
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c
index c4c1e76b1270..f5ecd2c4d813 100644
--- a/drivers/edac/i82860_edac.c
+++ b/drivers/edac/i82860_edac.c
@@ -186,7 +186,7 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
186 the channel and the GRA registers map to physical devices so we are 186 the channel and the GRA registers map to physical devices so we are
187 going to make 1 channel for group. 187 going to make 1 channel for group.
188 */ 188 */
189 mci = edac_mc_alloc(0, 16, 1); 189 mci = edac_mc_alloc(0, 16, 1, 0);
190 190
191 if (!mci) 191 if (!mci)
192 return -ENOMEM; 192 return -ENOMEM;
@@ -209,7 +209,7 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
209 /* Here we assume that we will never see multiple instances of this 209 /* Here we assume that we will never see multiple instances of this
210 * type of memory controller. The ID is therefore hardcoded to 0. 210 * type of memory controller. The ID is therefore hardcoded to 0.
211 */ 211 */
212 if (edac_mc_add_mc(mci, 0)) { 212 if (edac_mc_add_mc(mci)) {
213 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 213 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
214 goto fail; 214 goto fail;
215 } 215 }
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index 73a173e25985..031abadc439a 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -400,7 +400,7 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
400 drc = readl(ovrfl_window + I82875P_DRC); 400 drc = readl(ovrfl_window + I82875P_DRC);
401 nr_chans = dual_channel_active(drc) + 1; 401 nr_chans = dual_channel_active(drc) + 1;
402 mci = edac_mc_alloc(sizeof(*pvt), I82875P_NR_CSROWS(nr_chans), 402 mci = edac_mc_alloc(sizeof(*pvt), I82875P_NR_CSROWS(nr_chans),
403 nr_chans); 403 nr_chans, 0);
404 404
405 if (!mci) { 405 if (!mci) {
406 rc = -ENOMEM; 406 rc = -ENOMEM;
@@ -428,7 +428,7 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
428 /* Here we assume that we will never see multiple instances of this 428 /* Here we assume that we will never see multiple instances of this
429 * type of memory controller. The ID is therefore hardcoded to 0. 429 * type of memory controller. The ID is therefore hardcoded to 0.
430 */ 430 */
431 if (edac_mc_add_mc(mci, 0)) { 431 if (edac_mc_add_mc(mci)) {
432 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 432 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
433 goto fail1; 433 goto fail1;
434 } 434 }
diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c
index 4fcf23b61d8e..e66cdd42a392 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,
205 MCDEBUG_ERRCTL1_RFL_LOG_EN; 205 MCDEBUG_ERRCTL1_RFL_LOG_EN;
206 pci_write_config_dword(pdev, MCDEBUG_ERRCTL1, errctl1); 206 pci_write_config_dword(pdev, MCDEBUG_ERRCTL1, errctl1);
207 207
208 mci = edac_mc_alloc(0, PASEMI_EDAC_NR_CSROWS, PASEMI_EDAC_NR_CHANS); 208 mci = edac_mc_alloc(0, PASEMI_EDAC_NR_CSROWS, PASEMI_EDAC_NR_CHANS,
209 system_mmc_id++);
209 210
210 if (mci == NULL) 211 if (mci == NULL)
211 return -ENOMEM; 212 return -ENOMEM;
@@ -245,7 +246,7 @@ static int __devinit pasemi_edac_probe(struct pci_dev *pdev,
245 */ 246 */
246 pasemi_edac_get_error_info(mci); 247 pasemi_edac_get_error_info(mci);
247 248
248 if (edac_mc_add_mc(mci, system_mmc_id++)) 249 if (edac_mc_add_mc(mci))
249 goto fail; 250 goto fail;
250 251
251 /* get this far and it's successful */ 252 /* get this far and it's successful */
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
index eb6090e1b60f..e25f712f2dc3 100644
--- a/drivers/edac/r82600_edac.c
+++ b/drivers/edac/r82600_edac.c
@@ -278,7 +278,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
278 debugf2("%s(): sdram refresh rate = %#0x\n", __func__, 278 debugf2("%s(): sdram refresh rate = %#0x\n", __func__,
279 sdram_refresh_rate); 279 sdram_refresh_rate);
280 debugf2("%s(): DRAMC register = %#0x\n", __func__, dramcr); 280 debugf2("%s(): DRAMC register = %#0x\n", __func__, dramcr);
281 mci = edac_mc_alloc(0, R82600_NR_CSROWS, R82600_NR_CHANS); 281 mci = edac_mc_alloc(0, R82600_NR_CSROWS, R82600_NR_CHANS, 0);
282 282
283 if (mci == NULL) 283 if (mci == NULL)
284 return -ENOMEM; 284 return -ENOMEM;
@@ -316,7 +316,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
316 /* Here we assume that we will never see multiple instances of this 316 /* Here we assume that we will never see multiple instances of this
317 * type of memory controller. The ID is therefore hardcoded to 0. 317 * type of memory controller. The ID is therefore hardcoded to 0.
318 */ 318 */
319 if (edac_mc_add_mc(mci, 0)) { 319 if (edac_mc_add_mc(mci)) {
320 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 320 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
321 goto fail; 321 goto fail;
322 } 322 }