diff options
Diffstat (limited to 'drivers/edac/e7xxx_edac.c')
-rw-r--r-- | drivers/edac/e7xxx_edac.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c index 2b20610991c0..453ba346b6ca 100644 --- a/drivers/edac/e7xxx_edac.c +++ b/drivers/edac/e7xxx_edac.c | |||
@@ -144,6 +144,8 @@ struct e7xxx_error_info { | |||
144 | u32 dram_uelog_add; | 144 | u32 dram_uelog_add; |
145 | }; | 145 | }; |
146 | 146 | ||
147 | static struct edac_pci_ctl_info *e7xxx_pci; | ||
148 | |||
147 | static const struct e7xxx_dev_info e7xxx_devs[] = { | 149 | static const struct e7xxx_dev_info e7xxx_devs[] = { |
148 | [E7500] = { | 150 | [E7500] = { |
149 | .err_dev = PCI_DEVICE_ID_INTEL_7500_1_ERR, | 151 | .err_dev = PCI_DEVICE_ID_INTEL_7500_1_ERR, |
@@ -481,6 +483,17 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
481 | goto fail1; | 483 | goto fail1; |
482 | } | 484 | } |
483 | 485 | ||
486 | /* allocating generic PCI control info */ | ||
487 | e7xxx_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR); | ||
488 | if (!e7xxx_pci) { | ||
489 | printk(KERN_WARNING | ||
490 | "%s(): Unable to create PCI control\n", | ||
491 | __func__); | ||
492 | printk(KERN_WARNING | ||
493 | "%s(): PCI error report via EDAC not setup\n", | ||
494 | __func__); | ||
495 | } | ||
496 | |||
484 | /* get this far and it's successful */ | 497 | /* get this far and it's successful */ |
485 | debugf3("%s(): success\n", __func__); | 498 | debugf3("%s(): success\n", __func__); |
486 | return 0; | 499 | return 0; |
@@ -512,6 +525,9 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev) | |||
512 | 525 | ||
513 | debugf0("%s()\n", __func__); | 526 | debugf0("%s()\n", __func__); |
514 | 527 | ||
528 | if (e7xxx_pci) | ||
529 | edac_pci_release_generic_ctl(e7xxx_pci); | ||
530 | |||
515 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) | 531 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
516 | return; | 532 | return; |
517 | 533 | ||