aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/au1000_eth.c
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2010-09-08 07:11:31 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-10 00:36:36 -0400
commitec7eabdde2cc3e71fa71f979bd3448c45122a4a8 (patch)
tree543997d67852b46fcb041cc7c733b6c57d0f6f7e /drivers/net/au1000_eth.c
parent3441592b34121a38047ed6680f0ed9b9017de9cf (diff)
au1000-eth: stylistic fixes
This patch fixes the following checkpatch.pl warnings: - spaces after tabs - space between function and arguments - one-line statement braces - tabs instead of spaces Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/au1000_eth.c')
-rw-r--r--drivers/net/au1000_eth.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index b8ae85c6da03..df3eee11cd95 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -13,7 +13,7 @@
13 * converted to use linux-2.6.x's PHY framework 13 * converted to use linux-2.6.x's PHY framework
14 * 14 *
15 * Author: MontaVista Software, Inc. 15 * Author: MontaVista Software, Inc.
16 * ppopov@mvista.com or source@mvista.com 16 * ppopov@mvista.com or source@mvista.com
17 * 17 *
18 * ######################################################################## 18 * ########################################################################
19 * 19 *
@@ -152,7 +152,7 @@ static void au1000_enable_mac(struct net_device *dev, int force_reset)
152 152
153 spin_lock_irqsave(&aup->lock, flags); 153 spin_lock_irqsave(&aup->lock, flags);
154 154
155 if(force_reset || (!aup->mac_enabled)) { 155 if (force_reset || (!aup->mac_enabled)) {
156 *aup->enable = MAC_EN_CLOCK_ENABLE; 156 *aup->enable = MAC_EN_CLOCK_ENABLE;
157 au_sync_delay(2); 157 au_sync_delay(2);
158 *aup->enable = (MAC_EN_RESET0 | MAC_EN_RESET1 | MAC_EN_RESET2 158 *aup->enable = (MAC_EN_RESET0 | MAC_EN_RESET1 | MAC_EN_RESET2
@@ -353,7 +353,7 @@ au1000_adjust_link(struct net_device *dev)
353 } 353 }
354} 354}
355 355
356static int au1000_mii_probe (struct net_device *dev) 356static int au1000_mii_probe(struct net_device *dev)
357{ 357{
358 struct au1000_private *const aup = netdev_priv(dev); 358 struct au1000_private *const aup = netdev_priv(dev);
359 struct phy_device *phydev = NULL; 359 struct phy_device *phydev = NULL;
@@ -457,9 +457,9 @@ static struct db_dest *au1000_GetFreeDB(struct au1000_private *aup)
457 struct db_dest *pDB; 457 struct db_dest *pDB;
458 pDB = aup->pDBfree; 458 pDB = aup->pDBfree;
459 459
460 if (pDB) { 460 if (pDB)
461 aup->pDBfree = pDB->pnext; 461 aup->pDBfree = pDB->pnext;
462 } 462
463 return pDB; 463 return pDB;
464} 464}
465 465
@@ -507,7 +507,7 @@ static void au1000_reset_mac(struct net_device *dev)
507 507
508 spin_lock_irqsave(&aup->lock, flags); 508 spin_lock_irqsave(&aup->lock, flags);
509 509
510 au1000_reset_mac_unlocked (dev); 510 au1000_reset_mac_unlocked(dev);
511 511
512 spin_unlock_irqrestore(&aup->lock, flags); 512 spin_unlock_irqrestore(&aup->lock, flags);
513} 513}
@@ -625,9 +625,9 @@ static int au1000_init(struct net_device *dev)
625 aup->mac->mac_addr_low = dev->dev_addr[3]<<24 | dev->dev_addr[2]<<16 | 625 aup->mac->mac_addr_low = dev->dev_addr[3]<<24 | dev->dev_addr[2]<<16 |
626 dev->dev_addr[1]<<8 | dev->dev_addr[0]; 626 dev->dev_addr[1]<<8 | dev->dev_addr[0];
627 627
628 for (i = 0; i < NUM_RX_DMA; i++) { 628 for (i = 0; i < NUM_RX_DMA; i++)
629 aup->rx_dma_ring[i]->buff_stat |= RX_DMA_ENABLE; 629 aup->rx_dma_ring[i]->buff_stat |= RX_DMA_ENABLE;
630 } 630
631 au_sync(); 631 au_sync();
632 632
633 control = MAC_RX_ENABLE | MAC_TX_ENABLE; 633 control = MAC_RX_ENABLE | MAC_TX_ENABLE;
@@ -854,7 +854,7 @@ static int au1000_close(struct net_device *dev)
854 854
855 spin_lock_irqsave(&aup->lock, flags); 855 spin_lock_irqsave(&aup->lock, flags);
856 856
857 au1000_reset_mac_unlocked (dev); 857 au1000_reset_mac_unlocked(dev);
858 858
859 /* stop the device */ 859 /* stop the device */
860 netif_stop_queue(dev); 860 netif_stop_queue(dev);
@@ -902,9 +902,9 @@ static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev)
902 pDB = aup->tx_db_inuse[aup->tx_head]; 902 pDB = aup->tx_db_inuse[aup->tx_head];
903 skb_copy_from_linear_data(skb, (void *)pDB->vaddr, skb->len); 903 skb_copy_from_linear_data(skb, (void *)pDB->vaddr, skb->len);
904 if (skb->len < ETH_ZLEN) { 904 if (skb->len < ETH_ZLEN) {
905 for (i = skb->len; i < ETH_ZLEN; i++) { 905 for (i = skb->len; i < ETH_ZLEN; i++)
906 ((char *)pDB->vaddr)[i] = 0; 906 ((char *)pDB->vaddr)[i] = 0;
907 } 907
908 ptxd->len = ETH_ZLEN; 908 ptxd->len = ETH_ZLEN;
909 } else 909 } else
910 ptxd->len = skb->len; 910 ptxd->len = skb->len;
@@ -1061,7 +1061,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
1061 goto err_remap1; 1061 goto err_remap1;
1062 } 1062 }
1063 1063
1064 /* Setup some variables for quick register address access */ 1064 /* Setup some variables for quick register address access */
1065 aup->enable = (volatile u32 *)ioremap_nocache(macen->start, resource_size(macen)); 1065 aup->enable = (volatile u32 *)ioremap_nocache(macen->start, resource_size(macen));
1066 if (!aup->enable) { 1066 if (!aup->enable) {
1067 dev_err(&pdev->dev, "failed to ioremap MAC enable register\n"); 1067 dev_err(&pdev->dev, "failed to ioremap MAC enable register\n");
@@ -1151,17 +1151,17 @@ static int __devinit au1000_probe(struct platform_device *pdev)
1151 1151
1152 for (i = 0; i < NUM_RX_DMA; i++) { 1152 for (i = 0; i < NUM_RX_DMA; i++) {
1153 pDB = au1000_GetFreeDB(aup); 1153 pDB = au1000_GetFreeDB(aup);
1154 if (!pDB) { 1154 if (!pDB)
1155 goto err_out; 1155 goto err_out;
1156 } 1156
1157 aup->rx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr; 1157 aup->rx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr;
1158 aup->rx_db_inuse[i] = pDB; 1158 aup->rx_db_inuse[i] = pDB;
1159 } 1159 }
1160 for (i = 0; i < NUM_TX_DMA; i++) { 1160 for (i = 0; i < NUM_TX_DMA; i++) {
1161 pDB = au1000_GetFreeDB(aup); 1161 pDB = au1000_GetFreeDB(aup);
1162 if (!pDB) { 1162 if (!pDB)
1163 goto err_out; 1163 goto err_out;
1164 } 1164
1165 aup->tx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr; 1165 aup->tx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr;
1166 aup->tx_dma_ring[i]->len = 0; 1166 aup->tx_dma_ring[i]->len = 0;
1167 aup->tx_db_inuse[i] = pDB; 1167 aup->tx_db_inuse[i] = pDB;