Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] atmel: whitespace cleanup

NET: atmel: whitespace cleanup

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Dmitry Torokhov and committed by
Jeff Garzik
5c877fe5 b4341135

+45 -45
+3 -3
drivers/net/wireless/atmel.c
··· 595 595 static void atmel_smooth_qual(struct atmel_private *priv); 596 596 static void atmel_writeAR(struct net_device *dev, u16 data); 597 597 static int probe_atmel_card(struct net_device *dev); 598 - static int reset_atmel_card(struct net_device *dev ); 598 + static int reset_atmel_card(struct net_device *dev); 599 599 static void atmel_enter_state(struct atmel_private *priv, int new_state); 600 600 int atmel_open (struct net_device *dev); 601 601 ··· 1736 1736 /* Disable the key */ 1737 1737 priv->wep_key_len[index] = 0; 1738 1738 /* Check if the key is not marked as invalid */ 1739 - if(!(dwrq->flags & IW_ENCODE_NOKEY)) { 1739 + if (!(dwrq->flags & IW_ENCODE_NOKEY)) { 1740 1740 /* Cleanup */ 1741 1741 memset(priv->wep_keys[index], 0, 13); 1742 1742 /* Copy the key in the driver */ ··· 1907 1907 1908 1908 encoding->flags = idx + 1; 1909 1909 memset(ext, 0, sizeof(*ext)); 1910 - 1910 + 1911 1911 if (!priv->wep_is_on) { 1912 1912 ext->alg = IW_ENCODE_ALG_NONE; 1913 1913 ext->key_len = 0;
+37 -37
drivers/net/wireless/atmel_cs.c
··· 5 5 Copyright 2000-2001 ATMEL Corporation. 6 6 Copyright 2003 Simon Kelley. 7 7 8 - This code was developed from version 2.1.1 of the Atmel drivers, 9 - released by Atmel corp. under the GPL in December 2002. It also 10 - includes code from the Linux aironet drivers (C) Benjamin Reed, 11 - and the Linux PCMCIA package, (C) David Hinds. 8 + This code was developed from version 2.1.1 of the Atmel drivers, 9 + released by Atmel corp. under the GPL in December 2002. It also 10 + includes code from the Linux aironet drivers (C) Benjamin Reed, 11 + and the Linux PCMCIA package, (C) David Hinds. 12 12 13 - For all queries about this code, please contact the current author, 13 + For all queries about this code, please contact the current author, 14 14 Simon Kelley <simon@thekelleys.org.uk> and not Atmel Corporation. 15 15 16 16 This program is free software; you can redistribute it and/or modify ··· 87 87 event is received. The config() and release() entry points are 88 88 used to configure or release a socket, in response to card 89 89 insertion and ejection events. They are invoked from the atmel_cs 90 - event handler. 90 + event handler. 91 91 */ 92 92 93 93 static int atmel_config(struct pcmcia_device *link); ··· 133 133 device IO routines can use a flag like this to throttle IO to a 134 134 card that is not ready to accept it. 135 135 */ 136 - 136 + 137 137 typedef struct local_info_t { 138 138 dev_node_t node; 139 139 struct net_device *eth_dev; 140 140 } local_info_t; 141 141 142 142 /*====================================================================== 143 - 143 + 144 144 atmel_attach() creates an "instance" of the driver, allocating 145 145 local data structures for one device. The device is registered 146 146 with Card Services. 147 - 147 + 148 148 The dev_link structure is initialized, but we don't actually 149 149 configure the card at this point -- we wait until we receive a 150 150 card insertion event. 151 - 151 + 152 152 ======================================================================*/ 153 153 154 154 static int atmel_probe(struct pcmcia_device *p_dev) ··· 184 184 } /* atmel_attach */ 185 185 186 186 /*====================================================================== 187 - 187 + 188 188 This deletes a driver "instance". The device is de-registered 189 189 with Card Services. If it has been released, all local data 190 190 structures are freed. Otherwise, the structures will be freed 191 191 when the device is released. 192 - 192 + 193 193 ======================================================================*/ 194 194 195 195 static void atmel_detach(struct pcmcia_device *link) ··· 202 202 } 203 203 204 204 /*====================================================================== 205 - 205 + 206 206 atmel_config() is scheduled to run after a CARD_INSERTION event 207 207 is received, to configure the PCMCIA socket, and to make the 208 208 device available to the system. 209 - 209 + 210 210 ======================================================================*/ 211 211 212 212 #define CS_CHECK(fn, ret) \ ··· 237 237 did = handle_to_dev(link).driver_data; 238 238 239 239 DEBUG(0, "atmel_config(0x%p)\n", link); 240 - 240 + 241 241 tuple.Attributes = 0; 242 242 tuple.TupleData = buf; 243 243 tuple.TupleDataMax = sizeof(buf); 244 244 tuple.TupleOffset = 0; 245 - 245 + 246 246 /* 247 247 This reads the card's CONFIG tuple to find its configuration 248 248 registers. ··· 258 258 In this loop, we scan the CIS for configuration table entries, 259 259 each of which describes a valid card configuration, including 260 260 voltage, IO window, memory window, and interrupt settings. 261 - 261 + 262 262 We make no assumptions about the card to be configured: we use 263 263 just the information available in the CIS. In an ideal world, 264 264 this would work for any PCMCIA card, but it requires a complete ··· 274 274 if (pcmcia_get_tuple_data(link, &tuple) != 0 || 275 275 pcmcia_parse_tuple(link, &tuple, &parse) != 0) 276 276 goto next_entry; 277 - 277 + 278 278 if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg; 279 279 if (cfg->index == 0) goto next_entry; 280 280 link->conf.ConfigIndex = cfg->index; 281 - 281 + 282 282 /* Does this card need audio output? */ 283 283 if (cfg->flags & CISTPL_CFTABLE_AUDIO) { 284 284 link->conf.Attributes |= CONF_ENABLE_SPKR; 285 285 link->conf.Status = CCSR_AUDIO_ENA; 286 286 } 287 - 287 + 288 288 /* Use power settings for Vcc and Vpp if present */ 289 289 /* Note that the CIS values need to be rescaled */ 290 290 if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM)) ··· 293 293 else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM)) 294 294 link->conf.Vpp = 295 295 dflt.vpp1.param[CISTPL_POWER_VNOM]/10000; 296 - 296 + 297 297 /* Do we need to allocate an interrupt? */ 298 298 if (cfg->irq.IRQInfo1 || dflt.irq.IRQInfo1) 299 299 link->conf.Attributes |= CONF_ENABLE_IRQ; 300 - 300 + 301 301 /* IO window settings */ 302 302 link->io.NumPorts1 = link->io.NumPorts2 = 0; 303 303 if ((cfg->io.nwin > 0) || (dflt.io.nwin > 0)) { ··· 315 315 link->io.NumPorts2 = io->win[1].len; 316 316 } 317 317 } 318 - 318 + 319 319 /* This reserves IO space but doesn't actually enable it */ 320 320 if (pcmcia_request_io(link, &link->io) != 0) 321 321 goto next_entry; 322 322 323 323 /* If we got this far, we're cool! */ 324 324 break; 325 - 325 + 326 326 next_entry: 327 327 CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(link, &tuple)); 328 328 } 329 - 329 + 330 330 /* 331 331 Allocate an interrupt line. Note that this does not assign a 332 332 handler to the interrupt, unless the 'Handler' member of the ··· 334 334 */ 335 335 if (link->conf.Attributes & CONF_ENABLE_IRQ) 336 336 CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); 337 - 337 + 338 338 /* 339 339 This actually configures the PCMCIA socket -- setting up 340 340 the I/O windows and the interrupt mapping, and putting the 341 341 card and host interface into "Memory and IO" mode. 342 342 */ 343 343 CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); 344 - 344 + 345 345 if (link->irq.AssignedIRQ == 0) { 346 - printk(KERN_ALERT 346 + printk(KERN_ALERT 347 347 "atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config."); 348 348 goto cs_failed; 349 349 } 350 - 351 - ((local_info_t*)link->priv)->eth_dev = 350 + 351 + ((local_info_t*)link->priv)->eth_dev = 352 352 init_atmel_card(link->irq.AssignedIRQ, 353 353 link->io.BasePort1, 354 354 did ? did->driver_info : ATMEL_FW_TYPE_NONE, 355 355 &handle_to_dev(link), 356 - card_present, 356 + card_present, 357 357 link); 358 - if (!((local_info_t*)link->priv)->eth_dev) 358 + if (!((local_info_t*)link->priv)->eth_dev) 359 359 goto cs_failed; 360 - 361 - 360 + 361 + 362 362 /* 363 363 At this point, the dev_node_t structure(s) need to be 364 364 initialized and arranged in a linked list at link->dev_node. ··· 376 376 } 377 377 378 378 /*====================================================================== 379 - 379 + 380 380 After a card is removed, atmel_release() will unregister the 381 381 device, and release the PCMCIA configuration. If the device is 382 382 still open, this will be postponed until it is closed. 383 - 383 + 384 384 ======================================================================*/ 385 385 386 386 static void atmel_release(struct pcmcia_device *link) ··· 517 517 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 518 518 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 519 519 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 520 - POSSIBILITY OF SUCH DAMAGE. 520 + POSSIBILITY OF SUCH DAMAGE. 521 521 */ 522 522 523 523 module_init(atmel_cs_init);
+5 -5
drivers/net/wireless/atmel_pci.c
··· 53 53 const struct pci_device_id *pent) 54 54 { 55 55 struct net_device *dev; 56 - 56 + 57 57 if (pci_enable_device(pdev)) 58 58 return -ENODEV; 59 - 59 + 60 60 pci_set_master(pdev); 61 - 62 - dev = init_atmel_card(pdev->irq, pdev->resource[1].start, 61 + 62 + dev = init_atmel_card(pdev->irq, pdev->resource[1].start, 63 63 ATMEL_FW_TYPE_506, 64 64 &pdev->dev, NULL, NULL); 65 65 if (!dev) 66 66 return -ENODEV; 67 - 67 + 68 68 pci_set_drvdata(pdev, dev); 69 69 return 0; 70 70 }