diff options
author | Dave Jiang <djiang@mvista.com> | 2007-07-19 04:50:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:55 -0400 |
commit | 456a2f9552e7849475f4aea1a9aa4c0e54b3ddda (patch) | |
tree | df1a120c837fe4c4635c55d81e249ee6d06f4436 /drivers/edac/r82600_edac.c | |
parent | cddbfcacf02dc2d5b074fc2717358a7529a190db (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/r82600_edac.c')
-rw-r--r-- | drivers/edac/r82600_edac.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c index 18206ce28d14..8097f2faaa8c 100644 --- a/drivers/edac/r82600_edac.c +++ b/drivers/edac/r82600_edac.c | |||
@@ -133,6 +133,8 @@ struct r82600_error_info { | |||
133 | 133 | ||
134 | static unsigned int disable_hardware_scrub = 0; | 134 | static unsigned int disable_hardware_scrub = 0; |
135 | 135 | ||
136 | static struct edac_pci_ctl_info *r82600_pci; | ||
137 | |||
136 | static void r82600_get_error_info(struct mem_ctl_info *mci, | 138 | static void r82600_get_error_info(struct mem_ctl_info *mci, |
137 | struct r82600_error_info *info) | 139 | struct r82600_error_info *info) |
138 | { | 140 | { |
@@ -326,6 +328,17 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx) | |||
326 | pci_write_bits32(pdev, R82600_EAP, BIT(31), BIT(31)); | 328 | pci_write_bits32(pdev, R82600_EAP, BIT(31), BIT(31)); |
327 | } | 329 | } |
328 | 330 | ||
331 | /* allocating generic PCI control info */ | ||
332 | r82600_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR); | ||
333 | if (!r82600_pci) { | ||
334 | printk(KERN_WARNING | ||
335 | "%s(): Unable to create PCI control\n", | ||
336 | __func__); | ||
337 | printk(KERN_WARNING | ||
338 | "%s(): PCI error report via EDAC not setup\n", | ||
339 | __func__); | ||
340 | } | ||
341 | |||
329 | debugf3("%s(): success\n", __func__); | 342 | debugf3("%s(): success\n", __func__); |
330 | return 0; | 343 | return 0; |
331 | 344 | ||
@@ -350,6 +363,9 @@ static void __devexit r82600_remove_one(struct pci_dev *pdev) | |||
350 | 363 | ||
351 | debugf0("%s()\n", __func__); | 364 | debugf0("%s()\n", __func__); |
352 | 365 | ||
366 | if (r82600_pci) | ||
367 | edac_pci_release_generic_ctl(r82600_pci); | ||
368 | |||
353 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) | 369 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
354 | return; | 370 | return; |
355 | 371 | ||