aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2015-08-08 16:35:04 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-20 22:32:35 -0400
commita8cedfec8f68e199ce9d00cee7868a5c65640bbc (patch)
treedfaa411b09d2345094941265d41fa2cce2d3f283 /drivers/char
parentff6f46483f0e14b829cd5a71bafcbb1c136a84b6 (diff)
drivers/char: make hpet.c explicitly non-modular
The Kconfig currently controlling compilation of this code is: char/Kconfig:config HPET char/Kconfig: bool "HPET - High Precision Event Timer" if (X86 || IA64) ...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 don't replace module.h with init.h since the file already has that. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We leave some tags like MODULE_AUTHOR for documentation purposes. Cc: Arnd Bergmann <arnd@arndb.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hpet.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 5c0baa9ffc64..240b6cf1d97c 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -12,7 +12,6 @@
12 */ 12 */
13 13
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/module.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/miscdevice.h> 17#include <linux/miscdevice.h>
@@ -1043,24 +1042,16 @@ static int hpet_acpi_add(struct acpi_device *device)
1043 return hpet_alloc(&data); 1042 return hpet_alloc(&data);
1044} 1043}
1045 1044
1046static int hpet_acpi_remove(struct acpi_device *device)
1047{
1048 /* XXX need to unregister clocksource, dealloc mem, etc */
1049 return -EINVAL;
1050}
1051
1052static const struct acpi_device_id hpet_device_ids[] = { 1045static const struct acpi_device_id hpet_device_ids[] = {
1053 {"PNP0103", 0}, 1046 {"PNP0103", 0},
1054 {"", 0}, 1047 {"", 0},
1055}; 1048};
1056MODULE_DEVICE_TABLE(acpi, hpet_device_ids);
1057 1049
1058static struct acpi_driver hpet_acpi_driver = { 1050static struct acpi_driver hpet_acpi_driver = {
1059 .name = "hpet", 1051 .name = "hpet",
1060 .ids = hpet_device_ids, 1052 .ids = hpet_device_ids,
1061 .ops = { 1053 .ops = {
1062 .add = hpet_acpi_add, 1054 .add = hpet_acpi_add,
1063 .remove = hpet_acpi_remove,
1064 }, 1055 },
1065}; 1056};
1066 1057
@@ -1086,19 +1077,9 @@ static int __init hpet_init(void)
1086 1077
1087 return 0; 1078 return 0;
1088} 1079}
1080device_initcall(hpet_init);
1089 1081
1090static void __exit hpet_exit(void) 1082/*
1091{
1092 acpi_bus_unregister_driver(&hpet_acpi_driver);
1093
1094 if (sysctl_header)
1095 unregister_sysctl_table(sysctl_header);
1096 misc_deregister(&hpet_misc);
1097
1098 return;
1099}
1100
1101module_init(hpet_init);
1102module_exit(hpet_exit);
1103MODULE_AUTHOR("Bob Picco <Robert.Picco@hp.com>"); 1083MODULE_AUTHOR("Bob Picco <Robert.Picco@hp.com>");
1104MODULE_LICENSE("GPL"); 1084MODULE_LICENSE("GPL");
1085*/