aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/orinoco_cs.c
diff options
context:
space:
mode:
authorAndrey Borzenkov <arvidjaar@mail.ru>2009-01-25 15:08:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-09 15:03:32 -0500
commitd14c7c1d6aef1175625ea72938b07cee072723dc (patch)
tree95022428783c802a21fcbe27d216e4c4d869b62f /drivers/net/wireless/orinoco/orinoco_cs.c
parentaa6320d336971171df1d13c1c284facf10804881 (diff)
orinoco: checkpatch cleanup
Fix errors and obvious warnings reported by checkpatch in all files except orinoco.c. Orinoco.c is part of different patch series of Dave. Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/orinoco_cs.c')
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index 0b32215d3f5d..d194b3e0311d 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -6,7 +6,7 @@
6 * It should also be usable on various Prism II based cards such as the 6 * It should also be usable on various Prism II based cards such as the
7 * Linksys, D-Link and Farallon Skyline. It should also work on Symbol 7 * Linksys, D-Link and Farallon Skyline. It should also work on Symbol
8 * cards such as the 3Com AirConnect and Ericsson WLAN. 8 * cards such as the 3Com AirConnect and Ericsson WLAN.
9 * 9 *
10 * Copyright notice & release notes in file orinoco.c 10 * Copyright notice & release notes in file orinoco.c
11 */ 11 */
12 12
@@ -30,7 +30,8 @@
30/********************************************************************/ 30/********************************************************************/
31 31
32MODULE_AUTHOR("David Gibson <hermes@gibson.dropbear.id.au>"); 32MODULE_AUTHOR("David Gibson <hermes@gibson.dropbear.id.au>");
33MODULE_DESCRIPTION("Driver for PCMCIA Lucent Orinoco, Prism II based and similar wireless cards"); 33MODULE_DESCRIPTION("Driver for PCMCIA Lucent Orinoco,"
34 " Prism II based and similar wireless cards");
34MODULE_LICENSE("Dual MPL/GPL"); 35MODULE_LICENSE("Dual MPL/GPL");
35 36
36/* Module parameters */ 37/* Module parameters */
@@ -53,8 +54,8 @@ struct orinoco_pccard {
53 54
54 /* Used to handle hard reset */ 55 /* Used to handle hard reset */
55 /* yuck, we need this hack to work around the insanity of the 56 /* yuck, we need this hack to work around the insanity of the
56 * PCMCIA layer */ 57 * PCMCIA layer */
57 unsigned long hard_reset_in_progress; 58 unsigned long hard_reset_in_progress;
58}; 59};
59 60
60 61
@@ -98,7 +99,7 @@ orinoco_cs_hard_reset(struct orinoco_private *priv)
98 * This creates an "instance" of the driver, allocating local data 99 * This creates an "instance" of the driver, allocating local data
99 * structures for one device. The device is registered with Card 100 * structures for one device. The device is registered with Card
100 * Services. 101 * Services.
101 * 102 *
102 * The dev_link structure is initialized, but we don't actually 103 * The dev_link structure is initialized, but we don't actually
103 * configure the card at this point -- we wait until we receive a card 104 * configure the card at this point -- we wait until we receive a card
104 * insertion event. */ 105 * insertion event. */
@@ -111,7 +112,7 @@ orinoco_cs_probe(struct pcmcia_device *link)
111 112
112 dev = alloc_orinocodev(sizeof(*card), &handle_to_dev(link), 113 dev = alloc_orinocodev(sizeof(*card), &handle_to_dev(link),
113 orinoco_cs_hard_reset, NULL); 114 orinoco_cs_hard_reset, NULL);
114 if (! dev) 115 if (!dev)
115 return -ENOMEM; 116 return -ENOMEM;
116 priv = netdev_priv(dev); 117 priv = netdev_priv(dev);
117 card = priv->card; 118 card = priv->card;
@@ -124,7 +125,7 @@ orinoco_cs_probe(struct pcmcia_device *link)
124 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; 125 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
125 link->irq.IRQInfo1 = IRQ_LEVEL_ID; 126 link->irq.IRQInfo1 = IRQ_LEVEL_ID;
126 link->irq.Handler = orinoco_interrupt; 127 link->irq.Handler = orinoco_interrupt;
127 link->irq.Instance = dev; 128 link->irq.Instance = dev;
128 129
129 /* General socket configuration defaults can go here. In this 130 /* General socket configuration defaults can go here. In this
130 * client, we assume very little, and rely on the CIS for 131 * client, we assume very little, and rely on the CIS for
@@ -162,8 +163,10 @@ static void orinoco_cs_detach(struct pcmcia_device *link)
162 */ 163 */
163 164
164#define CS_CHECK(fn, ret) do { \ 165#define CS_CHECK(fn, ret) do { \
165 last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; \ 166 last_fn = (fn); \
166 } while (0) 167 if ((last_ret = (ret)) != 0) \
168 goto cs_failed; \
169} while (0)
167 170
168static int orinoco_cs_config_check(struct pcmcia_device *p_dev, 171static int orinoco_cs_config_check(struct pcmcia_device *p_dev,
169 cistpl_cftable_entry_t *cfg, 172 cistpl_cftable_entry_t *cfg,
@@ -307,8 +310,8 @@ orinoco_cs_config(struct pcmcia_device *link)
307 * initialized and arranged in a linked list at link->dev_node. */ 310 * initialized and arranged in a linked list at link->dev_node. */
308 strcpy(card->node.dev_name, dev->name); 311 strcpy(card->node.dev_name, dev->name);
309 link->dev_node = &card->node; /* link->dev_node being non-NULL is also 312 link->dev_node = &card->node; /* link->dev_node being non-NULL is also
310 used to indicate that the 313 * used to indicate that the
311 net_device has been registered */ 314 * net_device has been registered */
312 315
313 /* Finally, report what we've done */ 316 /* Finally, report what we've done */
314 printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s, irq %d, io " 317 printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s, irq %d, io "
@@ -359,7 +362,7 @@ static int orinoco_cs_suspend(struct pcmcia_device *link)
359 /* This is probably racy, but I can't think of 362 /* This is probably racy, but I can't think of
360 a better way, short of rewriting the PCMCIA 363 a better way, short of rewriting the PCMCIA
361 layer to not suck :-( */ 364 layer to not suck :-( */
362 if (! test_bit(0, &card->hard_reset_in_progress)) { 365 if (!test_bit(0, &card->hard_reset_in_progress)) {
363 spin_lock_irqsave(&priv->lock, flags); 366 spin_lock_irqsave(&priv->lock, flags);
364 367
365 err = __orinoco_down(dev); 368 err = __orinoco_down(dev);
@@ -384,7 +387,7 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
384 int err = 0; 387 int err = 0;
385 unsigned long flags; 388 unsigned long flags;
386 389
387 if (! test_bit(0, &card->hard_reset_in_progress)) { 390 if (!test_bit(0, &card->hard_reset_in_progress)) {
388 err = orinoco_reinit_firmware(dev); 391 err = orinoco_reinit_firmware(dev);
389 if (err) { 392 if (err) {
390 printk(KERN_ERR "%s: Error %d re-initializing firmware\n", 393 printk(KERN_ERR "%s: Error %d re-initializing firmware\n",
@@ -397,7 +400,7 @@ static int orinoco_cs_resume(struct pcmcia_device *link)
397 netif_device_attach(dev); 400 netif_device_attach(dev);
398 priv->hw_unavailable--; 401 priv->hw_unavailable--;
399 402
400 if (priv->open && ! priv->hw_unavailable) { 403 if (priv->open && !priv->hw_unavailable) {
401 err = __orinoco_up(dev); 404 err = __orinoco_up(dev);
402 if (err) 405 if (err)
403 printk(KERN_ERR "%s: Error %d restarting card\n", 406 printk(KERN_ERR "%s: Error %d restarting card\n",