diff options
author | John Daiker <daikerjohn@gmail.com> | 2009-03-06 10:09:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-16 18:09:35 -0400 |
commit | 05c9a4cfe41f44abd5e73964fc734f01e2981442 (patch) | |
tree | 3e3c4d3beda2a35fe2e393da488a229d21a80c02 | |
parent | be1b08af61379be23d9975eaab29054e9166b13c (diff) |
airo_cs: checkpatch.pl cleanups
Hopefully nothing controversial here, since the driver hasn't been touched in a while!
Before: 36 errors, 6 warnings, 482 lines checked
After: 0 errors, 3 warnings, 485 lines checked
This was nearly all trailing whitespace, * and parenthesis spacing, and code indent changes.
md5sum of object file before and after are identical.
Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/airo_cs.c | 73 |
1 files changed, 38 insertions, 35 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index 27696c20f4c2..d0593ed9170e 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
@@ -16,8 +16,8 @@ | |||
16 | In addition this module was derived from dummy_cs. | 16 | In addition this module was derived from dummy_cs. |
17 | The initial developer of dummy_cs is David A. Hinds | 17 | The initial developer of dummy_cs is David A. Hinds |
18 | <dahinds@users.sourceforge.net>. Portions created by David A. Hinds | 18 | <dahinds@users.sourceforge.net>. Portions created by David A. Hinds |
19 | are Copyright (C) 1999 David A. Hinds. All Rights Reserved. | 19 | are Copyright (C) 1999 David A. Hinds. All Rights Reserved. |
20 | 20 | ||
21 | ======================================================================*/ | 21 | ======================================================================*/ |
22 | 22 | ||
23 | #ifdef __IN_PCMCIA_PACKAGE__ | 23 | #ifdef __IN_PCMCIA_PACKAGE__ |
@@ -38,7 +38,7 @@ | |||
38 | #include <pcmcia/cisreg.h> | 38 | #include <pcmcia/cisreg.h> |
39 | #include <pcmcia/ds.h> | 39 | #include <pcmcia/ds.h> |
40 | 40 | ||
41 | #include <asm/io.h> | 41 | #include <linux/io.h> |
42 | #include <asm/system.h> | 42 | #include <asm/system.h> |
43 | 43 | ||
44 | #include "airo.h" | 44 | #include "airo.h" |
@@ -54,7 +54,7 @@ | |||
54 | static int pc_debug = PCMCIA_DEBUG; | 54 | static int pc_debug = PCMCIA_DEBUG; |
55 | module_param(pc_debug, int, 0); | 55 | module_param(pc_debug, int, 0); |
56 | static char *version = "$Revision: 1.2 $"; | 56 | static char *version = "$Revision: 1.2 $"; |
57 | #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); | 57 | #define DEBUG(n, args...) if (pc_debug > (n)) printk(KERN_DEBUG args); |
58 | #else | 58 | #else |
59 | #define DEBUG(n, args...) | 59 | #define DEBUG(n, args...) |
60 | #endif | 60 | #endif |
@@ -62,9 +62,9 @@ static char *version = "$Revision: 1.2 $"; | |||
62 | /*====================================================================*/ | 62 | /*====================================================================*/ |
63 | 63 | ||
64 | MODULE_AUTHOR("Benjamin Reed"); | 64 | MODULE_AUTHOR("Benjamin Reed"); |
65 | MODULE_DESCRIPTION("Support for Cisco/Aironet 802.11 wireless ethernet \ | 65 | MODULE_DESCRIPTION("Support for Cisco/Aironet 802.11 wireless ethernet " |
66 | cards. This is the module that links the PCMCIA card \ | 66 | "cards. This is the module that links the PCMCIA card " |
67 | with the airo module."); | 67 | "with the airo module."); |
68 | MODULE_LICENSE("Dual BSD/GPL"); | 68 | MODULE_LICENSE("Dual BSD/GPL"); |
69 | MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards"); | 69 | MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards"); |
70 | 70 | ||
@@ -76,7 +76,7 @@ MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards"); | |||
76 | event is received. The config() and release() entry points are | 76 | event is received. The config() and release() entry points are |
77 | used to configure or release a socket, in response to card | 77 | used to configure or release a socket, in response to card |
78 | insertion and ejection events. They are invoked from the airo_cs | 78 | insertion and ejection events. They are invoked from the airo_cs |
79 | event handler. | 79 | event handler. |
80 | */ | 80 | */ |
81 | 81 | ||
82 | static int airo_config(struct pcmcia_device *link); | 82 | static int airo_config(struct pcmcia_device *link); |
@@ -103,8 +103,9 @@ static void airo_detach(struct pcmcia_device *p_dev); | |||
103 | by one struct pcmcia_device structure (defined in ds.h). | 103 | by one struct pcmcia_device structure (defined in ds.h). |
104 | 104 | ||
105 | You may not want to use a linked list for this -- for example, the | 105 | You may not want to use a linked list for this -- for example, the |
106 | memory card driver uses an array of struct pcmcia_device pointers, where minor | 106 | memory card driver uses an array of struct pcmcia_device pointers, |
107 | device numbers are used to derive the corresponding array index. | 107 | where minor device numbers are used to derive the corresponding |
108 | array index. | ||
108 | */ | 109 | */ |
109 | 110 | ||
110 | /* | 111 | /* |
@@ -122,22 +123,22 @@ static void airo_detach(struct pcmcia_device *p_dev); | |||
122 | device IO routines can use a flag like this to throttle IO to a | 123 | device IO routines can use a flag like this to throttle IO to a |
123 | card that is not ready to accept it. | 124 | card that is not ready to accept it. |
124 | */ | 125 | */ |
125 | 126 | ||
126 | typedef struct local_info_t { | 127 | typedef struct local_info_t { |
127 | dev_node_t node; | 128 | dev_node_t node; |
128 | struct net_device *eth_dev; | 129 | struct net_device *eth_dev; |
129 | } local_info_t; | 130 | } local_info_t; |
130 | 131 | ||
131 | /*====================================================================== | 132 | /*====================================================================== |
132 | 133 | ||
133 | airo_attach() creates an "instance" of the driver, allocating | 134 | airo_attach() creates an "instance" of the driver, allocating |
134 | local data structures for one device. The device is registered | 135 | local data structures for one device. The device is registered |
135 | with Card Services. | 136 | with Card Services. |
136 | 137 | ||
137 | The dev_link structure is initialized, but we don't actually | 138 | The dev_link structure is initialized, but we don't actually |
138 | configure the card at this point -- we wait until we receive a | 139 | configure the card at this point -- we wait until we receive a |
139 | card insertion event. | 140 | card insertion event. |
140 | 141 | ||
141 | ======================================================================*/ | 142 | ======================================================================*/ |
142 | 143 | ||
143 | static int airo_probe(struct pcmcia_device *p_dev) | 144 | static int airo_probe(struct pcmcia_device *p_dev) |
@@ -150,7 +151,7 @@ static int airo_probe(struct pcmcia_device *p_dev) | |||
150 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | 151 | p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
151 | p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID; | 152 | p_dev->irq.IRQInfo1 = IRQ_LEVEL_ID; |
152 | p_dev->irq.Handler = NULL; | 153 | p_dev->irq.Handler = NULL; |
153 | 154 | ||
154 | /* | 155 | /* |
155 | General socket configuration defaults can go here. In this | 156 | General socket configuration defaults can go here. In this |
156 | client, we assume very little, and rely on the CIS for almost | 157 | client, we assume very little, and rely on the CIS for almost |
@@ -160,7 +161,7 @@ static int airo_probe(struct pcmcia_device *p_dev) | |||
160 | */ | 161 | */ |
161 | p_dev->conf.Attributes = 0; | 162 | p_dev->conf.Attributes = 0; |
162 | p_dev->conf.IntType = INT_MEMORY_AND_IO; | 163 | p_dev->conf.IntType = INT_MEMORY_AND_IO; |
163 | 164 | ||
164 | /* Allocate space for private device-specific data */ | 165 | /* Allocate space for private device-specific data */ |
165 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); | 166 | local = kzalloc(sizeof(local_info_t), GFP_KERNEL); |
166 | if (!local) { | 167 | if (!local) { |
@@ -173,12 +174,12 @@ static int airo_probe(struct pcmcia_device *p_dev) | |||
173 | } /* airo_attach */ | 174 | } /* airo_attach */ |
174 | 175 | ||
175 | /*====================================================================== | 176 | /*====================================================================== |
176 | 177 | ||
177 | This deletes a driver "instance". The device is de-registered | 178 | This deletes a driver "instance". The device is de-registered |
178 | with Card Services. If it has been released, all local data | 179 | with Card Services. If it has been released, all local data |
179 | structures are freed. Otherwise, the structures will be freed | 180 | structures are freed. Otherwise, the structures will be freed |
180 | when the device is released. | 181 | when the device is released. |
181 | 182 | ||
182 | ======================================================================*/ | 183 | ======================================================================*/ |
183 | 184 | ||
184 | static void airo_detach(struct pcmcia_device *link) | 185 | static void airo_detach(struct pcmcia_device *link) |
@@ -187,20 +188,20 @@ static void airo_detach(struct pcmcia_device *link) | |||
187 | 188 | ||
188 | airo_release(link); | 189 | airo_release(link); |
189 | 190 | ||
190 | if ( ((local_info_t*)link->priv)->eth_dev ) { | 191 | if (((local_info_t *)link->priv)->eth_dev) { |
191 | stop_airo_card( ((local_info_t*)link->priv)->eth_dev, 0 ); | 192 | stop_airo_card(((local_info_t *)link->priv)->eth_dev, 0); |
192 | } | 193 | } |
193 | ((local_info_t*)link->priv)->eth_dev = NULL; | 194 | ((local_info_t *)link->priv)->eth_dev = NULL; |
194 | 195 | ||
195 | kfree(link->priv); | 196 | kfree(link->priv); |
196 | } /* airo_detach */ | 197 | } /* airo_detach */ |
197 | 198 | ||
198 | /*====================================================================== | 199 | /*====================================================================== |
199 | 200 | ||
200 | airo_config() is scheduled to run after a CARD_INSERTION event | 201 | airo_config() is scheduled to run after a CARD_INSERTION event |
201 | is received, to configure the PCMCIA socket, and to make the | 202 | is received, to configure the PCMCIA socket, and to make the |
202 | device available to the system. | 203 | device available to the system. |
203 | 204 | ||
204 | ======================================================================*/ | 205 | ======================================================================*/ |
205 | 206 | ||
206 | #define CS_CHECK(fn, ret) \ | 207 | #define CS_CHECK(fn, ret) \ |
@@ -325,26 +326,28 @@ static int airo_config(struct pcmcia_device *link) | |||
325 | */ | 326 | */ |
326 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 327 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
327 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); | 328 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); |
328 | 329 | ||
329 | /* | 330 | /* |
330 | This actually configures the PCMCIA socket -- setting up | 331 | This actually configures the PCMCIA socket -- setting up |
331 | the I/O windows and the interrupt mapping, and putting the | 332 | the I/O windows and the interrupt mapping, and putting the |
332 | card and host interface into "Memory and IO" mode. | 333 | card and host interface into "Memory and IO" mode. |
333 | */ | 334 | */ |
334 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); | 335 | CS_CHECK(RequestConfiguration, |
335 | ((local_info_t*)link->priv)->eth_dev = | 336 | pcmcia_request_configuration(link, &link->conf)); |
336 | init_airo_card( link->irq.AssignedIRQ, | 337 | ((local_info_t *)link->priv)->eth_dev = |
337 | link->io.BasePort1, 1, &handle_to_dev(link) ); | 338 | init_airo_card(link->irq.AssignedIRQ, |
338 | if (!((local_info_t*)link->priv)->eth_dev) goto cs_failed; | 339 | link->io.BasePort1, 1, &handle_to_dev(link)); |
339 | 340 | if (!((local_info_t *)link->priv)->eth_dev) | |
341 | goto cs_failed; | ||
342 | |||
340 | /* | 343 | /* |
341 | At this point, the dev_node_t structure(s) need to be | 344 | At this point, the dev_node_t structure(s) need to be |
342 | initialized and arranged in a linked list at link->dev_node. | 345 | initialized and arranged in a linked list at link->dev_node. |
343 | */ | 346 | */ |
344 | strcpy(dev->node.dev_name, ((local_info_t*)link->priv)->eth_dev->name ); | 347 | strcpy(dev->node.dev_name, ((local_info_t *)link->priv)->eth_dev->name); |
345 | dev->node.major = dev->node.minor = 0; | 348 | dev->node.major = dev->node.minor = 0; |
346 | link->dev_node = &dev->node; | 349 | link->dev_node = &dev->node; |
347 | 350 | ||
348 | /* Finally, report what we've done */ | 351 | /* Finally, report what we've done */ |
349 | printk(KERN_INFO "%s: index 0x%02x: ", | 352 | printk(KERN_INFO "%s: index 0x%02x: ", |
350 | dev->node.dev_name, link->conf.ConfigIndex); | 353 | dev->node.dev_name, link->conf.ConfigIndex); |
@@ -374,11 +377,11 @@ static int airo_config(struct pcmcia_device *link) | |||
374 | } /* airo_config */ | 377 | } /* airo_config */ |
375 | 378 | ||
376 | /*====================================================================== | 379 | /*====================================================================== |
377 | 380 | ||
378 | After a card is removed, airo_release() will unregister the | 381 | After a card is removed, airo_release() will unregister the |
379 | device, and release the PCMCIA configuration. If the device is | 382 | device, and release the PCMCIA configuration. If the device is |
380 | still open, this will be postponed until it is closed. | 383 | still open, this will be postponed until it is closed. |
381 | 384 | ||
382 | ======================================================================*/ | 385 | ======================================================================*/ |
383 | 386 | ||
384 | static void airo_release(struct pcmcia_device *link) | 387 | static void airo_release(struct pcmcia_device *link) |
@@ -475,7 +478,7 @@ static void airo_cs_cleanup(void) | |||
475 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 478 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
476 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | 479 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
477 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 480 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
478 | POSSIBILITY OF SUCH DAMAGE. | 481 | POSSIBILITY OF SUCH DAMAGE. |
479 | */ | 482 | */ |
480 | 483 | ||
481 | module_init(airo_cs_init); | 484 | module_init(airo_cs_init); |