summaryrefslogtreecommitdiff
path: root/drivers/edac/mv64x60_edac.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-12 04:36:20 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-12 04:36:20 (GMT)
commitd870a9d5e31ea69a1ceb7555d0d79364c442c5c0 (patch)
treeec20ff8bae64ceb35e86f44b1f30155b5d418693 /drivers/edac/mv64x60_edac.c
parent2634bf2550f4dd7d2d4373725dbe4c4d2a6499fd (diff)
parent1cac5503fbf751f121d0c9f96e69d1fdd3eb1471 (diff)
downloadlinux-d870a9d5e31ea69a1ceb7555d0d79364c442c5c0.tar.xz
Merge tag 'edac_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Pull EDAC updates from Borislav Petkov: - hide EDAC workqueue from users (Borislav Petkov) - edac_subsys init/teardown cleanup (Borislav Petkov) - make mpc85xx-pci-edac a platform device (Scott Wood) - sb_edac KNL gen2 support (Jim Snow) - other small cleanups all over the place * tag 'edac_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, i5100: Use to_delayed_work() MAINTAINERS: Fix EDAC repo URLs format EDAC, sb_edac: Set fixed DIMM width on Xeon Knights Landing EDAC: Rework workqueue handling EDAC: Make edac_device workqueue setup/teardown functions static EDAC: Remove edac_get_sysfs_subsys() error handling EDAC: Unexport and make edac_subsys static EDAC: Rip out the edac_subsys reference counting EDAC: Robustify workqueues destruction EDAC, mc_sysfs: Fix freeing bus' name EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device EDAC, sb_edac: Add Knights Landing (Xeon Phi gen 2) support EDAC, sb_edac: Add support for duplicate device IDs EDAC, sb_edac: Virtualize several hard-coded functions EDAC, mv64x60: Use platform_register/unregister_drivers() EDAC, mpc85xx: Use platform_register/unregister_drivers() EDAC: Add DDR4 flag EDAC: Remove references to bluesmoke.sourceforge.net EDAC, pci: Remove old disabled code
Diffstat (limited to 'drivers/edac/mv64x60_edac.c')
-rw-r--r--drivers/edac/mv64x60_edac.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c
index 0574e1b..6c54127 100644
--- a/drivers/edac/mv64x60_edac.c
+++ b/drivers/edac/mv64x60_edac.c
@@ -847,6 +847,15 @@ static struct platform_driver mv64x60_mc_err_driver = {
}
};
+static struct platform_driver * const drivers[] = {
+ &mv64x60_mc_err_driver,
+ &mv64x60_cpu_err_driver,
+ &mv64x60_sram_err_driver,
+#ifdef CONFIG_PCI
+ &mv64x60_pci_err_driver,
+#endif
+};
+
static int __init mv64x60_edac_init(void)
{
int ret = 0;
@@ -863,39 +872,13 @@ static int __init mv64x60_edac_init(void)
break;
}
- ret = platform_driver_register(&mv64x60_mc_err_driver);
- if (ret)
- printk(KERN_WARNING EDAC_MOD_STR "MC err failed to register\n");
-
- ret = platform_driver_register(&mv64x60_cpu_err_driver);
- if (ret)
- printk(KERN_WARNING EDAC_MOD_STR
- "CPU err failed to register\n");
-
- ret = platform_driver_register(&mv64x60_sram_err_driver);
- if (ret)
- printk(KERN_WARNING EDAC_MOD_STR
- "SRAM err failed to register\n");
-
-#ifdef CONFIG_PCI
- ret = platform_driver_register(&mv64x60_pci_err_driver);
- if (ret)
- printk(KERN_WARNING EDAC_MOD_STR
- "PCI err failed to register\n");
-#endif
-
- return ret;
+ return platform_register_drivers(drivers, ARRAY_SIZE(drivers));
}
module_init(mv64x60_edac_init);
static void __exit mv64x60_edac_exit(void)
{
-#ifdef CONFIG_PCI
- platform_driver_unregister(&mv64x60_pci_err_driver);
-#endif
- platform_driver_unregister(&mv64x60_sram_err_driver);
- platform_driver_unregister(&mv64x60_cpu_err_driver);
- platform_driver_unregister(&mv64x60_mc_err_driver);
+ platform_unregister_drivers(drivers, ARRAY_SIZE(drivers));
}
module_exit(mv64x60_edac_exit);