summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/apei
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-02-15 00:27:50 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-03-09 17:46:07 -0500
commit020bf066a6019807fc52a83e8bea5e0ad6a285e1 (patch)
treef22cc0709478bc0ae5d6ed78361f2cc134d96bad /drivers/acpi/apei
parentcc079f8cf729aaa9e704bbaba3d21a20a6abc036 (diff)
drivers/acpi: make apei/ghes.c more explicitly non-modular
The Kconfig currently controlling compilation of this code is: config ACPI_APEI_GHES bool "APEI Generic Hardware Error Source" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We replace module.h with moduleparam.h as we are keeping the pre-existing module_param that the file has, as currently that is the easiest way to maintain compatibility with the existing boot arg use cases. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r--drivers/acpi/apei/ghes.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 3dd9c462d22a..60746ef904e4 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <linux/module.h> 29#include <linux/moduleparam.h>
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/acpi.h> 31#include <linux/acpi.h>
32#include <linux/io.h> 32#include <linux/io.h>
@@ -79,6 +79,11 @@
79 ((struct acpi_hest_generic_status *) \ 79 ((struct acpi_hest_generic_status *) \
80 ((struct ghes_estatus_node *)(estatus_node) + 1)) 80 ((struct ghes_estatus_node *)(estatus_node) + 1))
81 81
82/*
83 * This driver isn't really modular, however for the time being,
84 * continuing to use module_param is the easiest way to remain
85 * compatible with existing boot arg use cases.
86 */
82bool ghes_disable; 87bool ghes_disable;
83module_param_named(disable, ghes_disable, bool, 0); 88module_param_named(disable, ghes_disable, bool, 0);
84 89
@@ -1148,18 +1153,4 @@ err_ioremap_exit:
1148err: 1153err:
1149 return rc; 1154 return rc;
1150} 1155}
1151 1156device_initcall(ghes_init);
1152static void __exit ghes_exit(void)
1153{
1154 platform_driver_unregister(&ghes_platform_driver);
1155 ghes_estatus_pool_exit();
1156 ghes_ioremap_exit();
1157}
1158
1159module_init(ghes_init);
1160module_exit(ghes_exit);
1161
1162MODULE_AUTHOR("Huang Ying");
1163MODULE_DESCRIPTION("APEI Generic Hardware Error Source support");
1164MODULE_LICENSE("GPL");
1165MODULE_ALIAS("platform:GHES");