aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i82875p_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/i82875p_edac.c')
-rw-r--r--drivers/edac/i82875p_edac.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index 889ccf6ad85c..214112b5e52a 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -183,6 +183,8 @@ static struct pci_dev *mci_pdev = NULL; /* init dev: in case that AGP code has
183 183
184static int i82875p_registered = 1; 184static int i82875p_registered = 1;
185 185
186static struct edac_pci_ctl_info *i82875p_pci;
187
186static void i82875p_get_error_info(struct mem_ctl_info *mci, 188static void i82875p_get_error_info(struct mem_ctl_info *mci,
187 struct i82875p_error_info *info) 189 struct i82875p_error_info *info)
188{ 190{
@@ -424,6 +426,17 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
424 goto fail1; 426 goto fail1;
425 } 427 }
426 428
429 /* allocating generic PCI control info */
430 i82875p_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR);
431 if (!i82875p_pci) {
432 printk(KERN_WARNING
433 "%s(): Unable to create PCI control\n",
434 __func__);
435 printk(KERN_WARNING
436 "%s(): PCI error report via EDAC not setup\n",
437 __func__);
438 }
439
427 /* get this far and it's successful */ 440 /* get this far and it's successful */
428 debugf3("%s(): success\n", __func__); 441 debugf3("%s(): success\n", __func__);
429 return 0; 442 return 0;
@@ -467,6 +480,9 @@ static void __devexit i82875p_remove_one(struct pci_dev *pdev)
467 480
468 debugf0("%s()\n", __func__); 481 debugf0("%s()\n", __func__);
469 482
483 if (i82875p_pci)
484 edac_pci_release_generic_ctl(i82875p_pci);
485
470 if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) 486 if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL)
471 return; 487 return;
472 488