linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pcmcia: m32r_pcc: make it explicitly non-modular
@ 2016-06-13 21:37 Paul Gortmaker
  0 siblings, 0 replies; only message in thread
From: Paul Gortmaker @ 2016-06-13 21:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Paul Gortmaker, linux-pcmcia

The Kconfig for this option is currently:

config M32R_PCC
    bool "M32R PCMCIA I/F"

...meaning that it currently is not being built as a module by anyone.
Lets remove the essentially orphaned module code, 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 also delete the MODULE_LICENSE tag since that information was
(or is now) contained at the top of the file in the comments.

There was no need for moduleparam.h in this file either, so we
remove that too.

Cc: linux-pcmcia@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---

[build tested for m32r on recent linux-next tree.]

 drivers/pcmcia/m32r_pcc.c | 23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)

diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c
index eb126b98ed8a..897ad0adaf27 100644
--- a/drivers/pcmcia/m32r_pcc.c
+++ b/drivers/pcmcia/m32r_pcc.c
@@ -5,10 +5,10 @@
  *
  *  Copyright (c) 2001, 2002, 2003, 2004
  *    Hiroyuki Kondo, Naoto Sugai, Hayato Fujiwara
+ *
+ *  License: Dual MPL/GPL
  */
 
-#include <linux/module.h>
-#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
@@ -729,23 +729,6 @@ static int __init init_m32r_pcc(void)
 
 	return 0;
 } /* init_m32r_pcc */
+device_initcall(init_m32r_pcc);
 
-static void __exit exit_m32r_pcc(void)
-{
-	int i;
-
-	for (i = 0; i < pcc_sockets; i++)
-		if (socket[i].flags & IS_REGISTERED)
-			pcmcia_unregister_socket(&socket[i].socket);
-
-	platform_device_unregister(&pcc_device);
-	if (poll_interval != 0)
-		del_timer_sync(&poll_timer);
-
-	platform_driver_unregister(&pcc_driver);
-} /* exit_m32r_pcc */
-
-module_init(init_m32r_pcc);
-module_exit(exit_m32r_pcc);
-MODULE_LICENSE("Dual MPL/GPL");
 /*====================================================================*/
-- 
2.8.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-13 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-13 21:37 [PATCH] pcmcia: m32r_pcc: make it explicitly non-modular Paul Gortmaker

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).