linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/rtc: make class.c explicitly non-modular
@ 2016-02-14 20:04 Paul Gortmaker
  2016-02-23 23:13 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Gortmaker @ 2016-02-14 20:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Alessandro Zummo, Alexandre Belloni, rtc-linux

The Makefile/Kconfig currently controlling compilation of this code is:

obj-$(CONFIG_RTC_CLASS)         += rtc-core.o
rtc-core-y                      := class.o interface.o

drivers/rtc/Kconfig:menuconfig RTC_CLASS
drivers/rtc/Kconfig:    bool "Real Time Clock"

...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 code there is no doubt it is builtin-only.

We don't replace module.h with init.h since the file does need
to know what a struct module is.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: rtc-linux@googlegroups.com
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/rtc/class.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index de86578bcd6d..74fd9746aeca 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -361,17 +361,4 @@ static int __init rtc_init(void)
 	rtc_dev_init();
 	return 0;
 }
-
-static void __exit rtc_exit(void)
-{
-	rtc_dev_exit();
-	class_destroy(rtc_class);
-	ida_destroy(&rtc_ida);
-}
-
 subsys_initcall(rtc_init);
-module_exit(rtc_exit);
-
-MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
-MODULE_DESCRIPTION("RTC class support");
-MODULE_LICENSE("GPL");
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers/rtc: make class.c explicitly non-modular
  2016-02-14 20:04 [PATCH] drivers/rtc: make class.c explicitly non-modular Paul Gortmaker
@ 2016-02-23 23:13 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2016-02-23 23:13 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: linux-kernel, Alessandro Zummo, rtc-linux

On 14/02/2016 at 15:04:19 -0500, Paul Gortmaker wrote :
> The Makefile/Kconfig currently controlling compilation of this code is:
> 
> obj-$(CONFIG_RTC_CLASS)         += rtc-core.o
> rtc-core-y                      := class.o interface.o
> 
> drivers/rtc/Kconfig:menuconfig RTC_CLASS
> drivers/rtc/Kconfig:    bool "Real Time Clock"
> 
> ...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 code there is no doubt it is builtin-only.
> 
> We don't replace module.h with init.h since the file does need
> to know what a struct module is.
> 
> We also delete the MODULE_LICENSE tag etc. since all that information
> is already contained at the top of the file in the comments.
> 
> Cc: Alessandro Zummo <a.zummo@towertech.it>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: rtc-linux@googlegroups.com
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>  drivers/rtc/class.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-23 23:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-14 20:04 [PATCH] drivers/rtc: make class.c explicitly non-modular Paul Gortmaker
2016-02-23 23:13 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).