lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 13 Jun 2016 17:37:07 -0400
From:	Paul Gortmaker <paul.gortmaker@...driver.com>
To:	<linux-kernel@...r.kernel.org>
CC:	Paul Gortmaker <paul.gortmaker@...driver.com>,
	<linux-pcmcia@...ts.infradead.org>
Subject: [PATCH] pcmcia: m32r_pcc: make it explicitly non-modular

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@...ts.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ