diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-09 11:43:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-09 11:43:56 -0500 |
commit | 57a0c1e2d6cb70ad0f8549ae730fc58fd0553429 (patch) | |
tree | 1c6bd5ceec0de88c357b698fe4d8fe8d110e26cb /drivers/edac | |
parent | e53289c0c5e5a24e29e571eba7af05c845c10890 (diff) | |
parent | 44d22e2404b3ce93a314654962d31acc8afcdd62 (diff) |
Merge tag 'edac_fixes_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Pull EDAC fixes from Borislav Petkov:
"Two error path fixes causing a crash and a Kconfig fix for an issue
which spilled all EDAC suboptions into the 'Device Drivers' menu."
* tag 'edac_fixes_for_3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
EDAC: Cleanup device deregistering path
EDAC: Fix EDAC Kconfig menu
EDAC: Fix kernel panic on module unloading
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/Kconfig | 8 | ||||
-rw-r--r-- | drivers/edac/edac_mc_sysfs.c | 19 |
2 files changed, 9 insertions, 18 deletions
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 4c6c876d9dc3..66719925970f 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig | |||
@@ -4,6 +4,9 @@ | |||
4 | # Licensed and distributed under the GPL | 4 | # Licensed and distributed under the GPL |
5 | # | 5 | # |
6 | 6 | ||
7 | config EDAC_SUPPORT | ||
8 | bool | ||
9 | |||
7 | menuconfig EDAC | 10 | menuconfig EDAC |
8 | bool "EDAC (Error Detection And Correction) reporting" | 11 | bool "EDAC (Error Detection And Correction) reporting" |
9 | depends on HAS_IOMEM | 12 | depends on HAS_IOMEM |
@@ -27,13 +30,8 @@ menuconfig EDAC | |||
27 | There is also a mailing list for the EDAC project, which can | 30 | There is also a mailing list for the EDAC project, which can |
28 | be found via the sourceforge page. | 31 | be found via the sourceforge page. |
29 | 32 | ||
30 | config EDAC_SUPPORT | ||
31 | bool | ||
32 | |||
33 | if EDAC | 33 | if EDAC |
34 | 34 | ||
35 | comment "Reporting subsystems" | ||
36 | |||
37 | config EDAC_LEGACY_SYSFS | 35 | config EDAC_LEGACY_SYSFS |
38 | bool "EDAC legacy sysfs" | 36 | bool "EDAC legacy sysfs" |
39 | default y | 37 | default y |
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index de2df92f9c77..0ca1ca71157f 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c | |||
@@ -472,8 +472,7 @@ static void edac_delete_csrow_objects(struct mem_ctl_info *mci) | |||
472 | device_remove_file(&csrow->dev, | 472 | device_remove_file(&csrow->dev, |
473 | dynamic_csrow_ce_count_attr[chan]); | 473 | dynamic_csrow_ce_count_attr[chan]); |
474 | } | 474 | } |
475 | put_device(&mci->csrows[i]->dev); | 475 | device_unregister(&mci->csrows[i]->dev); |
476 | device_del(&mci->csrows[i]->dev); | ||
477 | } | 476 | } |
478 | } | 477 | } |
479 | #endif | 478 | #endif |
@@ -1055,11 +1054,9 @@ fail: | |||
1055 | struct dimm_info *dimm = mci->dimms[i]; | 1054 | struct dimm_info *dimm = mci->dimms[i]; |
1056 | if (dimm->nr_pages == 0) | 1055 | if (dimm->nr_pages == 0) |
1057 | continue; | 1056 | continue; |
1058 | put_device(&dimm->dev); | 1057 | device_unregister(&dimm->dev); |
1059 | device_del(&dimm->dev); | ||
1060 | } | 1058 | } |
1061 | put_device(&mci->dev); | 1059 | device_unregister(&mci->dev); |
1062 | device_del(&mci->dev); | ||
1063 | bus_unregister(&mci->bus); | 1060 | bus_unregister(&mci->bus); |
1064 | kfree(mci->bus.name); | 1061 | kfree(mci->bus.name); |
1065 | return err; | 1062 | return err; |
@@ -1086,16 +1083,14 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | |||
1086 | if (dimm->nr_pages == 0) | 1083 | if (dimm->nr_pages == 0) |
1087 | continue; | 1084 | continue; |
1088 | edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev)); | 1085 | edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev)); |
1089 | put_device(&dimm->dev); | 1086 | device_unregister(&dimm->dev); |
1090 | device_del(&dimm->dev); | ||
1091 | } | 1087 | } |
1092 | } | 1088 | } |
1093 | 1089 | ||
1094 | void edac_unregister_sysfs(struct mem_ctl_info *mci) | 1090 | void edac_unregister_sysfs(struct mem_ctl_info *mci) |
1095 | { | 1091 | { |
1096 | edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev)); | 1092 | edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev)); |
1097 | put_device(&mci->dev); | 1093 | device_unregister(&mci->dev); |
1098 | device_del(&mci->dev); | ||
1099 | bus_unregister(&mci->bus); | 1094 | bus_unregister(&mci->bus); |
1100 | kfree(mci->bus.name); | 1095 | kfree(mci->bus.name); |
1101 | } | 1096 | } |
@@ -1159,8 +1154,6 @@ int __init edac_mc_sysfs_init(void) | |||
1159 | 1154 | ||
1160 | void __exit edac_mc_sysfs_exit(void) | 1155 | void __exit edac_mc_sysfs_exit(void) |
1161 | { | 1156 | { |
1162 | put_device(mci_pdev); | 1157 | device_unregister(mci_pdev); |
1163 | device_del(mci_pdev); | ||
1164 | edac_put_sysfs_subsys(); | 1158 | edac_put_sysfs_subsys(); |
1165 | kfree(mci_pdev); | ||
1166 | } | 1159 | } |