aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd76x_edac.c
diff options
context:
space:
mode:
authorDave Jiang <djiang@mvista.com>2007-07-19 04:50:10 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:55 -0400
commit456a2f9552e7849475f4aea1a9aa4c0e54b3ddda (patch)
treedf1a120c837fe4c4635c55d81e249ee6d06f4436 /drivers/edac/amd76x_edac.c
parentcddbfcacf02dc2d5b074fc2717358a7529a190db (diff)
drivers/edac: drivers to use new PCI operation
Move x86 drivers to new pci controller setup Signed-off-by: Dave Jiang <djiang@mvista.com> Signed-off-by: Douglas Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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