[PATCH 08/19] staging: unisys: visorchipset: Move module paramters around and mark static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
Tested-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/visorchipset/globals.h      | 11 --------
 .../unisys/visorchipset/visorchipset_main.c        | 33 +++++++++++-----------
 2 files changed, 17 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/globals.h b/drivers/staging/unisys/visorchipset/globals.h
index f76e498..0884a68 100644
--- a/drivers/staging/unisys/visorchipset/globals.h
+++ b/drivers/staging/unisys/visorchipset/globals.h
@@ -28,15 +28,4 @@
 
 /* module parameters */
 
-extern int visorchipset_testvnic;
-extern int visorchipset_testvnicclient;
-extern int visorchipset_testmsg;
-extern int visorchipset_major;
-extern int visorchipset_serverregwait;
-extern int visorchipset_clientregwait;
-extern int visorchipset_testteardown;
-extern int visorchipset_disable_controlvm;
-extern int visorchipset_crash_kernel;
-extern int visorchipset_holdchipsetready;
-
 #endif
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 54abe13..4f7d986 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -43,6 +43,20 @@
 #define POLLJIFFIES_CONTROLVMCHANNEL_FAST   1
 #define POLLJIFFIES_CONTROLVMCHANNEL_SLOW 100
 
+/*
+ * Module parameters
+ */
+static int visorchipset_testvnic;
+static int visorchipset_testvnicclient;
+static int visorchipset_testmsg;
+static int visorchipset_major;
+static int visorchipset_serverregwait;
+static int visorchipset_clientregwait = 1;	/* default is on */
+static int visorchipset_testteardown;
+static int visorchipset_disable_controlvm;
+static int visorchipset_crash_kernel;
+static int visorchipset_holdchipsetready;
+
 /* When the controlvm channel is idle for at least MIN_IDLE_SECONDS,
 * we switch to slow polling mode.  As soon as we get a controlvm
 * message, we switch back to fast polling mode.
@@ -2279,47 +2293,34 @@ visorchipset_exit(void)
 
 module_param_named(testvnic, visorchipset_testvnic, int, S_IRUGO);
 MODULE_PARM_DESC(visorchipset_testvnic, "1 to test vnic, using dummy VNIC connected via a loopback to a physical ethernet");
-int visorchipset_testvnic = 0;
-
 module_param_named(testvnicclient, visorchipset_testvnicclient, int, S_IRUGO);
 MODULE_PARM_DESC(visorchipset_testvnicclient, "1 to test vnic, using real VNIC channel attached to a separate IOVM guest");
-int visorchipset_testvnicclient = 0;
-
 module_param_named(testmsg, visorchipset_testmsg, int, S_IRUGO);
 MODULE_PARM_DESC(visorchipset_testmsg,
 		 "1 to manufacture the chipset, bus, and switch messages");
-int visorchipset_testmsg = 0;
-
 module_param_named(major, visorchipset_major, int, S_IRUGO);
-MODULE_PARM_DESC(visorchipset_major, "major device number to use for the device node");
-int visorchipset_major = 0;
-
+MODULE_PARM_DESC(visorchipset_major,
+		 "major device number to use for the device node");
 module_param_named(serverregwait, visorchipset_serverregwait, int, S_IRUGO);
 MODULE_PARM_DESC(visorchipset_serverreqwait,
 		 "1 to have the module wait for the visor bus to register");
-int visorchipset_serverregwait = 0;	/* default is off */
 module_param_named(clientregwait, visorchipset_clientregwait, int, S_IRUGO);
 MODULE_PARM_DESC(visorchipset_clientregwait, "1 to have the module wait for the visorclientbus to register");
-int visorchipset_clientregwait = 1;	/* default is on */
 module_param_named(testteardown, visorchipset_testteardown, int, S_IRUGO);
 MODULE_PARM_DESC(visorchipset_testteardown,
 		 "1 to test teardown of the chipset, bus, and switch");
-int visorchipset_testteardown = 0;	/* default is off */
 module_param_named(disable_controlvm, visorchipset_disable_controlvm, int,
 		   S_IRUGO);
 MODULE_PARM_DESC(visorchipset_disable_controlvm,
 		 "1 to disable polling of controlVm channel");
-int visorchipset_disable_controlvm = 0;	/* default is off */
 module_param_named(crash_kernel, visorchipset_crash_kernel, int, S_IRUGO);
 MODULE_PARM_DESC(visorchipset_crash_kernel,
 		 "1 means we are running in crash kernel");
-int visorchipset_crash_kernel = 0; /* default is running in non-crash kernel */
 module_param_named(holdchipsetready, visorchipset_holdchipsetready,
 		   int, S_IRUGO);
 MODULE_PARM_DESC(visorchipset_holdchipsetready,
 		 "1 to hold response to CHIPSET_READY");
-int visorchipset_holdchipsetready = 0; /* default is to send CHIPSET_READY
-				      * response immediately */
+
 module_init(visorchipset_init);
 module_exit(visorchipset_exit);
 
-- 
2.1.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux