aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2009-02-04 18:05:47 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-11 11:44:27 -0500
commit2131266d6e53e8f84f8111323036343d72bcb856 (patch)
tree3ad8f10777e2b7ffb4ad414d01b334598831d415
parentb2f30a0a2395b6c7e7138fbdabec2cb02ff373a7 (diff)
orinoco: Fix interesting checkpatch errors
ERROR: "foo * bar" should be "foo *bar" ERROR: do not initialise statics to 0 or NULL WARNING: printk() should include KERN_ facility level WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/orinoco/orinoco.c52
1 files changed, 22 insertions, 30 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco.c b/drivers/net/wireless/orinoco/orinoco.c
index acfced8ea0d..1544effd95e 100644
--- a/drivers/net/wireless/orinoco/orinoco.c
+++ b/drivers/net/wireless/orinoco/orinoco.c
@@ -110,9 +110,9 @@ MODULE_LICENSE("Dual MPL/GPL");
110/* Level of debugging. Used in the macros in orinoco.h */ 110/* Level of debugging. Used in the macros in orinoco.h */
111#ifdef ORINOCO_DEBUG 111#ifdef ORINOCO_DEBUG
112int orinoco_debug = ORINOCO_DEBUG; 112int orinoco_debug = ORINOCO_DEBUG;
113EXPORT_SYMBOL(orinoco_debug);
113module_param(orinoco_debug, int, 0644); 114module_param(orinoco_debug, int, 0644);
114MODULE_PARM_DESC(orinoco_debug, "Debug level"); 115MODULE_PARM_DESC(orinoco_debug, "Debug level");
115EXPORT_SYMBOL(orinoco_debug);
116#endif 116#endif
117 117
118static int suppress_linkstatus; /* = 0 */ 118static int suppress_linkstatus; /* = 0 */
@@ -1650,7 +1650,7 @@ static void orinoco_rx_isr_tasklet(unsigned long data)
1650 1650
1651static void print_linkstatus(struct net_device *dev, u16 status) 1651static void print_linkstatus(struct net_device *dev, u16 status)
1652{ 1652{
1653 char * s; 1653 char *s;
1654 1654
1655 if (suppress_linkstatus) 1655 if (suppress_linkstatus)
1656 return; 1656 return;
@@ -2309,6 +2309,7 @@ int __orinoco_up(struct net_device *dev)
2309 2309
2310 return 0; 2310 return 0;
2311} 2311}
2312EXPORT_SYMBOL(__orinoco_up);
2312 2313
2313int __orinoco_down(struct net_device *dev) 2314int __orinoco_down(struct net_device *dev)
2314{ 2315{
@@ -2340,6 +2341,7 @@ int __orinoco_down(struct net_device *dev)
2340 2341
2341 return 0; 2342 return 0;
2342} 2343}
2344EXPORT_SYMBOL(__orinoco_down);
2343 2345
2344static int orinoco_allocate_fid(struct net_device *dev) 2346static int orinoco_allocate_fid(struct net_device *dev)
2345{ 2347{
@@ -2350,16 +2352,12 @@ static int orinoco_allocate_fid(struct net_device *dev)
2350 err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); 2352 err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid);
2351 if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) { 2353 if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) {
2352 /* Try workaround for old Symbol firmware bug */ 2354 /* Try workaround for old Symbol firmware bug */
2353 printk(KERN_WARNING "%s: firmware ALLOC bug detected "
2354 "(old Symbol firmware?). Trying to work around... ",
2355 dev->name);
2356
2357 priv->nicbuf_size = TX_NICBUF_SIZE_BUG; 2355 priv->nicbuf_size = TX_NICBUF_SIZE_BUG;
2358 err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); 2356 err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid);
2359 if (err) 2357
2360 printk("failed!\n"); 2358 printk(KERN_WARNING "%s: firmware ALLOC bug detected "
2361 else 2359 "(old Symbol firmware?). Work around %s\n",
2362 printk("ok.\n"); 2360 dev->name, err ? "failed!" : "ok.");
2363 } 2361 }
2364 2362
2365 return err; 2363 return err;
@@ -2382,6 +2380,7 @@ int orinoco_reinit_firmware(struct net_device *dev)
2382 2380
2383 return err; 2381 return err;
2384} 2382}
2383EXPORT_SYMBOL(orinoco_reinit_firmware);
2385 2384
2386static int __orinoco_hw_set_bitrate(struct orinoco_private *priv) 2385static int __orinoco_hw_set_bitrate(struct orinoco_private *priv)
2387{ 2386{
@@ -3060,12 +3059,14 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id)
3060 hermes_t *hw = &priv->hw; 3059 hermes_t *hw = &priv->hw;
3061 int count = MAX_IRQLOOPS_PER_IRQ; 3060 int count = MAX_IRQLOOPS_PER_IRQ;
3062 u16 evstat, events; 3061 u16 evstat, events;
3063 /* These are used to detect a runaway interrupt situation */ 3062 /* These are used to detect a runaway interrupt situation.
3064 /* If we get more than MAX_IRQLOOPS_PER_JIFFY iterations in a jiffy, 3063 *
3065 * we panic and shut down the hardware */ 3064 * If we get more than MAX_IRQLOOPS_PER_JIFFY iterations in a jiffy,
3066 static int last_irq_jiffy = 0; /* jiffies value the last time 3065 * we panic and shut down the hardware
3067 * we were called */ 3066 */
3068 static int loops_this_jiffy = 0; 3067 /* jiffies value the last time we were called */
3068 static int last_irq_jiffy; /* = 0 */
3069 static int loops_this_jiffy; /* = 0 */
3069 unsigned long flags; 3070 unsigned long flags;
3070 3071
3071 if (orinoco_lock(priv, &flags) != 0) { 3072 if (orinoco_lock(priv, &flags) != 0) {
@@ -3127,6 +3128,7 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id)
3127 orinoco_unlock(priv, &flags); 3128 orinoco_unlock(priv, &flags);
3128 return IRQ_HANDLED; 3129 return IRQ_HANDLED;
3129} 3130}
3131EXPORT_SYMBOL(orinoco_interrupt);
3130 3132
3131/********************************************************************/ 3133/********************************************************************/
3132/* Power management */ 3134/* Power management */
@@ -3442,11 +3444,8 @@ static int orinoco_init(struct net_device *dev)
3442 printk(KERN_DEBUG "%s: IEEE standard IBSS ad-hoc mode supported\n", 3444 printk(KERN_DEBUG "%s: IEEE standard IBSS ad-hoc mode supported\n",
3443 dev->name); 3445 dev->name);
3444 if (priv->has_wep) { 3446 if (priv->has_wep) {
3445 printk(KERN_DEBUG "%s: WEP supported, ", dev->name); 3447 printk(KERN_DEBUG "%s: WEP supported, %s-bit key\n", dev->name,
3446 if (priv->has_big_wep) 3448 priv->has_big_wep ? "104" : "40");
3447 printk("104-bit key\n");
3448 else
3449 printk("40-bit key\n");
3450 } 3449 }
3451 if (priv->has_wpa) { 3450 if (priv->has_wpa) {
3452 printk(KERN_DEBUG "%s: WPA-PSK supported\n", dev->name); 3451 printk(KERN_DEBUG "%s: WPA-PSK supported\n", dev->name);
@@ -3672,6 +3671,7 @@ struct net_device
3672 3671
3673 return dev; 3672 return dev;
3674} 3673}
3674EXPORT_SYMBOL(alloc_orinocodev);
3675 3675
3676void free_orinocodev(struct net_device *dev) 3676void free_orinocodev(struct net_device *dev)
3677{ 3677{
@@ -3701,6 +3701,7 @@ void free_orinocodev(struct net_device *dev)
3701 orinoco_bss_data_free(priv); 3701 orinoco_bss_data_free(priv);
3702 free_netdev(dev); 3702 free_netdev(dev);
3703} 3703}
3704EXPORT_SYMBOL(free_orinocodev);
3704 3705
3705/********************************************************************/ 3706/********************************************************************/
3706/* Wireless extensions */ 3707/* Wireless extensions */
@@ -6143,15 +6144,6 @@ static const struct ethtool_ops orinoco_ethtool_ops = {
6143/* Module initialization */ 6144/* Module initialization */
6144/********************************************************************/ 6145/********************************************************************/
6145 6146
6146EXPORT_SYMBOL(alloc_orinocodev);
6147EXPORT_SYMBOL(free_orinocodev);
6148
6149EXPORT_SYMBOL(__orinoco_up);
6150EXPORT_SYMBOL(__orinoco_down);
6151EXPORT_SYMBOL(orinoco_reinit_firmware);
6152
6153EXPORT_SYMBOL(orinoco_interrupt);
6154
6155/* Can't be declared "const" or the whole __initdata section will 6147/* Can't be declared "const" or the whole __initdata section will
6156 * become const */ 6148 * become const */
6157static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION 6149static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION