diff options
Diffstat (limited to 'drivers/edac/i82860_edac.c')
-rw-r--r-- | drivers/edac/i82860_edac.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c index bd7bbb733f79..db8a864f16f6 100644 --- a/drivers/edac/i82860_edac.c +++ b/drivers/edac/i82860_edac.c | |||
@@ -60,6 +60,7 @@ static const struct i82860_dev_info i82860_devs[] = { | |||
60 | static struct pci_dev *mci_pdev = NULL; /* init dev: in case that AGP code | 60 | static struct pci_dev *mci_pdev = NULL; /* init dev: in case that AGP code |
61 | * has already registered driver | 61 | * has already registered driver |
62 | */ | 62 | */ |
63 | static struct edac_pci_ctl_info *i82860_pci; | ||
63 | 64 | ||
64 | static void i82860_get_error_info(struct mem_ctl_info *mci, | 65 | static void i82860_get_error_info(struct mem_ctl_info *mci, |
65 | struct i82860_error_info *info) | 66 | struct i82860_error_info *info) |
@@ -213,6 +214,17 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx) | |||
213 | goto fail; | 214 | goto fail; |
214 | } | 215 | } |
215 | 216 | ||
217 | /* allocating generic PCI control info */ | ||
218 | i82860_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR); | ||
219 | if (!i82860_pci) { | ||
220 | printk(KERN_WARNING | ||
221 | "%s(): Unable to create PCI control\n", | ||
222 | __func__); | ||
223 | printk(KERN_WARNING | ||
224 | "%s(): PCI error report via EDAC not setup\n", | ||
225 | __func__); | ||
226 | } | ||
227 | |||
216 | /* get this far and it's successful */ | 228 | /* get this far and it's successful */ |
217 | debugf3("%s(): success\n", __func__); | 229 | debugf3("%s(): success\n", __func__); |
218 | 230 | ||
@@ -249,6 +261,9 @@ static void __devexit i82860_remove_one(struct pci_dev *pdev) | |||
249 | 261 | ||
250 | debugf0("%s()\n", __func__); | 262 | debugf0("%s()\n", __func__); |
251 | 263 | ||
264 | if (i82860_pci) | ||
265 | edac_pci_release_generic_ctl(i82860_pci); | ||
266 | |||
252 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) | 267 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
253 | return; | 268 | return; |
254 | 269 | ||