diff options
Diffstat (limited to 'drivers/net/wireless/p54')
| -rw-r--r-- | drivers/net/wireless/p54/p54spi.c | 37 | 
1 files changed, 8 insertions, 29 deletions
| diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c index 978e7eb26567..7fc46f26cf2b 100644 --- a/drivers/net/wireless/p54/p54spi.c +++ b/drivers/net/wireless/p54/p54spi.c @@ -42,8 +42,7 @@  MODULE_FIRMWARE("3826.arm"); -/* - * gpios should be handled in board files and provided via platform data, +/* gpios should be handled in board files and provided via platform data,   * but because it's currently impossible for p54spi to have a header file   * in include/linux, let's use module paramaters for now   */ @@ -191,8 +190,7 @@ static int p54spi_request_eeprom(struct ieee80211_hw *dev)  	const struct firmware *eeprom;  	int ret; -	/* -	 * allow users to customize their eeprom. +	/* allow users to customize their eeprom.  	 */  	ret = request_firmware(&eeprom, "3826.eeprom", &priv->spi->dev); @@ -285,8 +283,7 @@ static void p54spi_power_on(struct p54s_priv *priv)  	gpio_set_value(p54spi_gpio_power, 1);  	enable_irq(gpio_to_irq(p54spi_gpio_irq)); -	/* -	 * need to wait a while before device can be accessed, the length +	/* need to wait a while before device can be accessed, the length  	 * is just a guess  	 */  	msleep(10); @@ -365,7 +362,8 @@ static int p54spi_rx(struct p54s_priv *priv)  	/* Firmware may insert up to 4 padding bytes after the lmac header,  	 * but it does not amend the size of SPI data transfer.  	 * Such packets has correct data size in header, thus referencing -	 * past the end of allocated skb. Reserve extra 4 bytes for this case */ +	 * past the end of allocated skb. Reserve extra 4 bytes for this case +	 */  	skb = dev_alloc_skb(len + 4);  	if (!skb) {  		p54spi_sleep(priv); @@ -383,7 +381,8 @@ static int p54spi_rx(struct p54s_priv *priv)  	}  	p54spi_sleep(priv);  	/* Put additional bytes to compensate for the possible -	 * alignment-caused truncation */ +	 * alignment-caused truncation +	 */  	skb_put(skb, 4);  	if (p54_rx(priv->hw, skb) == 0) @@ -713,27 +712,7 @@ static struct spi_driver p54spi_driver = {  	.remove		= p54spi_remove,  }; -static int __init p54spi_init(void) -{ -	int ret; - -	ret = spi_register_driver(&p54spi_driver); -	if (ret < 0) { -		printk(KERN_ERR "failed to register SPI driver: %d", ret); -		goto out; -	} - -out: -	return ret; -} - -static void __exit p54spi_exit(void) -{ -	spi_unregister_driver(&p54spi_driver); -} - -module_init(p54spi_init); -module_exit(p54spi_exit); +module_spi_driver(p54spi_driver);  MODULE_LICENSE("GPL");  MODULE_AUTHOR("Christian Lamparter <[email protected]>"); |