aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd76x_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/amd76x_edac.c')
-rw-r--r--drivers/edac/amd76x_edac.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
index eaa225192098..cc392eebee5c 100644
--- a/drivers/edac/amd76x_edac.c
+++ b/drivers/edac/amd76x_edac.c
@@ -91,6 +91,8 @@ static const struct amd76x_dev_info amd76x_devs[] = {
91 .ctl_name = "AMD762"}, 91 .ctl_name = "AMD762"},
92}; 92};
93 93
94static struct edac_pci_ctl_info *amd76x_pci;
95
94/** 96/**
95 * amd76x_get_error_info - fetch error information 97 * amd76x_get_error_info - fetch error information
96 * @mci: Memory controller 98 * @mci: Memory controller
@@ -266,6 +268,17 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx)
266 goto fail; 268 goto fail;
267 } 269 }
268 270
271 /* allocating generic PCI control info */
272 amd76x_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR);
273 if (!amd76x_pci) {
274 printk(KERN_WARNING
275 "%s(): Unable to create PCI control\n",
276 __func__);
277 printk(KERN_WARNING
278 "%s(): PCI error report via EDAC not setup\n",
279 __func__);
280 }
281
269 /* get this far and it's successful */ 282 /* get this far and it's successful */
270 debugf3("%s(): success\n", __func__); 283 debugf3("%s(): success\n", __func__);
271 return 0; 284 return 0;
@@ -299,6 +312,9 @@ static void __devexit amd76x_remove_one(struct pci_dev *pdev)
299 312
300 debugf0("%s()\n", __func__); 313 debugf0("%s()\n", __func__);
301 314
315 if (amd76x_pci)
316 edac_pci_release_generic_ctl(amd76x_pci);
317
302 if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) 318 if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL)
303 return; 319 return;
304 320