aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/e752x_edac.c
diff options
context:
space:
mode:
authorDave Jiang <djiang@mvista.com>2007-07-19 04:49:52 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:54 -0400
commit91b99041c1d577ded1da599ddc28cec2e07253cf (patch)
tree21b132d19166dca5c363b98e20741b78df4ad68a /drivers/edac/e752x_edac.c
parent81d87cb13e367bb804bf44889ae0de7369705d6c (diff)
drivers/edac: updated PCI monitoring
Moving PCI to a per-instance device model This should include the correct sysfs setup as well. Please review. 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/e752x_edac.c')
-rw-r--r--drivers/edac/e752x_edac.c16
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
31static int force_function_unhide; 31static int force_function_unhide;
32 32
33static 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