]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
wimax/i2400m: Move module params to other file so they can be static
authorPrasanna S Panchamukhi <prasannax.s.panchamukhi@intel.com>
Wed, 18 Nov 2009 02:29:35 +0000 (18:29 -0800)
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Tue, 11 May 2010 21:10:24 +0000 (14:10 -0700)
This patch moves the module parameters to the file where they
can be avoided to be global and allow them to be static.

The module param : idle_mode_disabled and power_save_disabled
are moved from  driver.c to control.c. Also these module parameters
are declared to be static as they are not required to be global anymore.
The module param : rx_reorder_disabled is moved from driver.c file to
rx.c file. Also this parameter is declated as static as it is not
required to be global anymore.

Signed-off-by: Prasanna S Panchamukhi<prasannax.s.panchamukhi@intel.com>
drivers/net/wimax/i2400m/control.c
drivers/net/wimax/i2400m/driver.c
drivers/net/wimax/i2400m/i2400m.h
drivers/net/wimax/i2400m/rx.c

index 6180772dcc092011bf98f995048b45b81df2efa5..0c1aa886753141f97a499c695107667e88b9d8a4 100644 (file)
 #define D_SUBMODULE control
 #include "debug-levels.h"
 
+static int i2400m_idle_mode_disabled;/* 0 (idle mode enabled) by default */
+module_param_named(idle_mode_disabled, i2400m_idle_mode_disabled, int, 0644);
+MODULE_PARM_DESC(idle_mode_disabled,
+                "If true, the device will not enable idle mode negotiation "
+                "with the base station (when connected) to save power.");
+
+/* 0 (power saving enabled) by default */
+static int i2400m_power_save_disabled;
+module_param_named(power_save_disabled, i2400m_power_save_disabled, int, 0644);
+MODULE_PARM_DESC(power_save_disabled,
+                "If true, the driver will not tell the device to enter "
+                "power saving mode when it reports it is ready for it. "
+                "False by default (so the device is told to do power "
+                "saving).");
+
 int i2400m_passive_mode;       /* 0 (passive mode disabled) by default */
 module_param_named(passive_mode, i2400m_passive_mode, int, 0644);
 MODULE_PARM_DESC(passive_mode,
index 39cf96a90d7a9674130f876555a653640aad7db7..66bdb5d6cd3446d120deccc5b43db24c1d180572 100644 (file)
 #include "debug-levels.h"
 
 
-int i2400m_idle_mode_disabled; /* 0 (idle mode enabled) by default */
-module_param_named(idle_mode_disabled, i2400m_idle_mode_disabled, int, 0644);
-MODULE_PARM_DESC(idle_mode_disabled,
-                "If true, the device will not enable idle mode negotiation "
-                "with the base station (when connected) to save power.");
-
-int i2400m_rx_reorder_disabled;        /* 0 (rx reorder enabled) by default */
-module_param_named(rx_reorder_disabled, i2400m_rx_reorder_disabled, int, 0644);
-MODULE_PARM_DESC(rx_reorder_disabled,
-                "If true, RX reordering will be disabled.");
-
-int i2400m_power_save_disabled;        /* 0 (power saving enabled) by default */
-module_param_named(power_save_disabled, i2400m_power_save_disabled, int, 0644);
-MODULE_PARM_DESC(power_save_disabled,
-                "If true, the driver will not tell the device to enter "
-                "power saving mode when it reports it is ready for it. "
-                "False by default (so the device is told to do power "
-                "saving).");
-
 static char i2400m_debug_params[128];
 module_param_string(debug, i2400m_debug_params, sizeof(i2400m_debug_params),
                    0644);
index 1babc55b131224ea39a3285bdf26c2b9b52f3053..fa74777fd65f6cc79e9d59dbe679373a886ed91e 100644 (file)
@@ -885,7 +885,6 @@ extern int i2400m_rx(struct i2400m *, struct sk_buff *);
 extern struct i2400m_msg_hdr *i2400m_tx_msg_get(struct i2400m *, size_t *);
 extern void i2400m_tx_msg_sent(struct i2400m *);
 
-extern int i2400m_power_save_disabled;
 
 /*
  * Utility functions
@@ -992,10 +991,5 @@ extern int i2400m_barker_db_init(const char *);
 extern void i2400m_barker_db_exit(void);
 
 
-/* Module parameters */
-
-extern int i2400m_idle_mode_disabled;
-extern int i2400m_rx_reorder_disabled;
-
 
 #endif /* #ifndef __I2400M_H__ */
index 0004c686ac68c4c9a338eb70556d4ef9a5c88901..c835ae8b89ce6c8555589ffc5245875ededdbda8 100644 (file)
 #define D_SUBMODULE rx
 #include "debug-levels.h"
 
+static int i2400m_rx_reorder_disabled; /* 0 (rx reorder enabled) by default */
+module_param_named(rx_reorder_disabled, i2400m_rx_reorder_disabled, int, 0644);
+MODULE_PARM_DESC(rx_reorder_disabled,
+                "If true, RX reordering will be disabled.");
+
 struct i2400m_report_hook_args {
        struct sk_buff *skb_rx;
        const struct i2400m_l3l4_hdr *l3l4_hdr;