Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/char: make efirtc.c driver explicitly non-modular

The Kconfig for this driver is currently:

config EFI_RTC
bool "EFI Real Time Clock Services"

...meaning that it currently is not being built as a module by anyone.
Lets remove all modular references, 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 leave some tags like MODULE_LICENSE for documentation purposes.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Paul Gortmaker and committed by
Greg Kroah-Hartman
9b7ebe01 67dd339c

+3 -10
+3 -10
drivers/char/efirtc.c
··· 30 30 #include <linux/types.h> 31 31 #include <linux/errno.h> 32 32 #include <linux/miscdevice.h> 33 - #include <linux/module.h> 34 33 #include <linux/init.h> 35 34 #include <linux/rtc.h> 36 35 #include <linux/proc_fs.h> ··· 394 395 } 395 396 return 0; 396 397 } 398 + device_initcall(efi_rtc_init); 397 399 398 - static void __exit 399 - efi_rtc_exit(void) 400 - { 401 - /* not yet used */ 402 - } 403 - 404 - module_init(efi_rtc_init); 405 - module_exit(efi_rtc_exit); 406 - 400 + /* 407 401 MODULE_LICENSE("GPL"); 402 + */