diff options
author | David Kilroy <kilroyd@googlemail.com> | 2009-02-04 18:05:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-11 11:44:27 -0500 |
commit | 2131266d6e53e8f84f8111323036343d72bcb856 (patch) | |
tree | 3ad8f10777e2b7ffb4ad414d01b334598831d415 /drivers/net/wireless/orinoco | |
parent | b2f30a0a2395b6c7e7138fbdabec2cb02ff373a7 (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>
Diffstat (limited to 'drivers/net/wireless/orinoco')
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco.c | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco.c b/drivers/net/wireless/orinoco/orinoco.c index acfced8ea0d5..1544effd95e3 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 |
112 | int orinoco_debug = ORINOCO_DEBUG; | 112 | int orinoco_debug = ORINOCO_DEBUG; |
113 | EXPORT_SYMBOL(orinoco_debug); | ||
113 | module_param(orinoco_debug, int, 0644); | 114 | module_param(orinoco_debug, int, 0644); |
114 | MODULE_PARM_DESC(orinoco_debug, "Debug level"); | 115 | MODULE_PARM_DESC(orinoco_debug, "Debug level"); |
115 | EXPORT_SYMBOL(orinoco_debug); | ||
116 | #endif | 116 | #endif |
117 | 117 | ||
118 | static int suppress_linkstatus; /* = 0 */ | 118 | static int suppress_linkstatus; /* = 0 */ |
@@ -1650,7 +1650,7 @@ static void orinoco_rx_isr_tasklet(unsigned long data) | |||
1650 | 1650 | ||
1651 | static void print_linkstatus(struct net_device *dev, u16 status) | 1651 | static 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 | } |
2312 | EXPORT_SYMBOL(__orinoco_up); | ||
2312 | 2313 | ||
2313 | int __orinoco_down(struct net_device *dev) | 2314 | int __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 | } |
2344 | EXPORT_SYMBOL(__orinoco_down); | ||
2343 | 2345 | ||
2344 | static int orinoco_allocate_fid(struct net_device *dev) | 2346 | static 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 | } |
2383 | EXPORT_SYMBOL(orinoco_reinit_firmware); | ||
2385 | 2384 | ||
2386 | static int __orinoco_hw_set_bitrate(struct orinoco_private *priv) | 2385 | static 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 | } |
3131 | EXPORT_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 | } |
3674 | EXPORT_SYMBOL(alloc_orinocodev); | ||
3675 | 3675 | ||
3676 | void free_orinocodev(struct net_device *dev) | 3676 | void 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 | } |
3704 | EXPORT_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 | ||
6146 | EXPORT_SYMBOL(alloc_orinocodev); | ||
6147 | EXPORT_SYMBOL(free_orinocodev); | ||
6148 | |||
6149 | EXPORT_SYMBOL(__orinoco_up); | ||
6150 | EXPORT_SYMBOL(__orinoco_down); | ||
6151 | EXPORT_SYMBOL(orinoco_reinit_firmware); | ||
6152 | |||
6153 | EXPORT_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 */ |
6157 | static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION | 6149 | static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION |