diff options
Diffstat (limited to 'drivers/edac/e752x_edac.c')
-rw-r--r-- | drivers/edac/e752x_edac.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c index 10f84995472d..d8b86584afbb 100644 --- a/drivers/edac/e752x_edac.c +++ b/drivers/edac/e752x_edac.c | |||
@@ -30,6 +30,8 @@ | |||
30 | 30 | ||
31 | static int force_function_unhide; | 31 | static int force_function_unhide; |
32 | 32 | ||
33 | static struct edac_pci_ctl_info *e752x_pci; | ||
34 | |||
33 | #define e752x_printk(level, fmt, arg...) \ | 35 | #define e752x_printk(level, fmt, arg...) \ |
34 | edac_printk(level, "e752x", fmt, ##arg) | 36 | edac_printk(level, "e752x", fmt, ##arg) |
35 | 37 | ||
@@ -1040,6 +1042,17 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
1040 | e752x_init_error_reporting_regs(pvt); | 1042 | e752x_init_error_reporting_regs(pvt); |
1041 | e752x_get_error_info(mci, &discard); /* clear other MCH errors */ | 1043 | e752x_get_error_info(mci, &discard); /* clear other MCH errors */ |
1042 | 1044 | ||
1045 | /* allocating generic PCI control info */ | ||
1046 | e752x_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR); | ||
1047 | if (!e752x_pci) { | ||
1048 | printk(KERN_WARNING | ||
1049 | "%s(): Unable to create PCI control\n", | ||
1050 | __func__); | ||
1051 | printk(KERN_WARNING | ||
1052 | "%s(): PCI error report via EDAC not setup\n", | ||
1053 | __func__); | ||
1054 | } | ||
1055 | |||
1043 | /* get this far and it's successful */ | 1056 | /* get this far and it's successful */ |
1044 | debugf3("%s(): success\n", __func__); | 1057 | debugf3("%s(): success\n", __func__); |
1045 | return 0; | 1058 | return 0; |
@@ -1073,6 +1086,9 @@ static void __devexit e752x_remove_one(struct pci_dev *pdev) | |||
1073 | 1086 | ||
1074 | debugf0("%s()\n", __func__); | 1087 | debugf0("%s()\n", __func__); |
1075 | 1088 | ||
1089 | if (e752x_pci) | ||
1090 | edac_pci_release_generic_ctl(e752x_pci); | ||
1091 | |||
1076 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) | 1092 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
1077 | return; | 1093 | return; |
1078 | 1094 | ||