au1000-eth: stylistic fixes
[sfrench/cifs-2.6.git] / drivers / net / au1000_eth.c
index 15ae6df2ff00b89885e778f8b1a8241a1959ddc3..df3eee11cd95c9fb59b8a2f9e2fe30157a802ab8 100644 (file)
@@ -13,7 +13,7 @@
  *  converted to use linux-2.6.x's PHY framework
  *
  * Author: MontaVista Software, Inc.
- *             ppopov@mvista.com or source@mvista.com
+ *             ppopov@mvista.com or source@mvista.com
  *
  * ########################################################################
  *
@@ -152,7 +152,7 @@ static void au1000_enable_mac(struct net_device *dev, int force_reset)
 
        spin_lock_irqsave(&aup->lock, flags);
 
-       if(force_reset || (!aup->mac_enabled)) {
+       if (force_reset || (!aup->mac_enabled)) {
                *aup->enable = MAC_EN_CLOCK_ENABLE;
                au_sync_delay(2);
                *aup->enable = (MAC_EN_RESET0 | MAC_EN_RESET1 | MAC_EN_RESET2
@@ -353,7 +353,7 @@ au1000_adjust_link(struct net_device *dev)
        }
 }
 
-static int au1000_mii_probe (struct net_device *dev)
+static int au1000_mii_probe(struct net_device *dev)
 {
        struct au1000_private *const aup = netdev_priv(dev);
        struct phy_device *phydev = NULL;
@@ -452,20 +452,20 @@ static int au1000_mii_probe (struct net_device *dev)
  * has the virtual and dma address of a buffer suitable for
  * both, receive and transmit operations.
  */
-static db_dest_t *au1000_GetFreeDB(struct au1000_private *aup)
+static struct db_dest *au1000_GetFreeDB(struct au1000_private *aup)
 {
-       db_dest_t *pDB;
+       struct db_dest *pDB;
        pDB = aup->pDBfree;
 
-       if (pDB) {
+       if (pDB)
                aup->pDBfree = pDB->pnext;
-       }
+
        return pDB;
 }
 
-void au1000_ReleaseDB(struct au1000_private *aup, db_dest_t *pDB)
+void au1000_ReleaseDB(struct au1000_private *aup, struct db_dest *pDB)
 {
-       db_dest_t *pDBfree = aup->pDBfree;
+       struct db_dest *pDBfree = aup->pDBfree;
        if (pDBfree)
                pDBfree->pnext = pDB;
        aup->pDBfree = pDB;
@@ -507,7 +507,7 @@ static void au1000_reset_mac(struct net_device *dev)
 
        spin_lock_irqsave(&aup->lock, flags);
 
-       au1000_reset_mac_unlocked (dev);
+       au1000_reset_mac_unlocked(dev);
 
        spin_unlock_irqrestore(&aup->lock, flags);
 }
@@ -524,11 +524,11 @@ au1000_setup_hw_rings(struct au1000_private *aup, u32 rx_base, u32 tx_base)
 
        for (i = 0; i < NUM_RX_DMA; i++) {
                aup->rx_dma_ring[i] =
-                       (volatile rx_dma_t *) (rx_base + sizeof(rx_dma_t)*i);
+                       (volatile struct rx_dma *) (rx_base + sizeof(struct rx_dma)*i);
        }
        for (i = 0; i < NUM_TX_DMA; i++) {
                aup->tx_dma_ring[i] =
-                       (volatile tx_dma_t *) (tx_base + sizeof(tx_dma_t)*i);
+                       (volatile struct tx_dma *) (tx_base + sizeof(struct tx_dma)*i);
        }
 }
 
@@ -625,9 +625,9 @@ static int au1000_init(struct net_device *dev)
        aup->mac->mac_addr_low = dev->dev_addr[3]<<24 | dev->dev_addr[2]<<16 |
                dev->dev_addr[1]<<8 | dev->dev_addr[0];
 
-       for (i = 0; i < NUM_RX_DMA; i++) {
+       for (i = 0; i < NUM_RX_DMA; i++)
                aup->rx_dma_ring[i]->buff_stat |= RX_DMA_ENABLE;
-       }
+
        au_sync();
 
        control = MAC_RX_ENABLE | MAC_TX_ENABLE;
@@ -681,9 +681,9 @@ static int au1000_rx(struct net_device *dev)
 {
        struct au1000_private *aup = netdev_priv(dev);
        struct sk_buff *skb;
-       volatile rx_dma_t *prxd;
+       volatile struct rx_dma *prxd;
        u32 buff_stat, status;
-       db_dest_t *pDB;
+       struct db_dest *pDB;
        u32     frmlen;
 
        netif_dbg(aup, rx_status, dev, "au1000_rx head %d\n", aup->rx_head);
@@ -774,7 +774,7 @@ static void au1000_update_tx_stats(struct net_device *dev, u32 status)
 static void au1000_tx_ack(struct net_device *dev)
 {
        struct au1000_private *aup = netdev_priv(dev);
-       volatile tx_dma_t *ptxd;
+       volatile struct tx_dma *ptxd;
 
        ptxd = aup->tx_dma_ring[aup->tx_tail];
 
@@ -854,7 +854,7 @@ static int au1000_close(struct net_device *dev)
 
        spin_lock_irqsave(&aup->lock, flags);
 
-       au1000_reset_mac_unlocked (dev);
+       au1000_reset_mac_unlocked(dev);
 
        /* stop the device */
        netif_stop_queue(dev);
@@ -873,9 +873,9 @@ static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev)
 {
        struct au1000_private *aup = netdev_priv(dev);
        struct net_device_stats *ps = &dev->stats;
-       volatile tx_dma_t *ptxd;
+       volatile struct tx_dma *ptxd;
        u32 buff_stat;
-       db_dest_t *pDB;
+       struct db_dest *pDB;
        int i;
 
        netif_dbg(aup, tx_queued, dev, "tx: aup %x len=%d, data=%p, head %d\n",
@@ -902,9 +902,9 @@ static netdev_tx_t au1000_tx(struct sk_buff *skb, struct net_device *dev)
        pDB = aup->tx_db_inuse[aup->tx_head];
        skb_copy_from_linear_data(skb, (void *)pDB->vaddr, skb->len);
        if (skb->len < ETH_ZLEN) {
-               for (i = skb->len; i < ETH_ZLEN; i++) {
+               for (i = skb->len; i < ETH_ZLEN; i++)
                        ((char *)pDB->vaddr)[i] = 0;
-               }
+
                ptxd->len = ETH_ZLEN;
        } else
                ptxd->len = skb->len;
@@ -991,7 +991,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
        struct au1000_private *aup = NULL;
        struct au1000_eth_platform_data *pd;
        struct net_device *dev = NULL;
-       db_dest_t *pDB, *pDBfree;
+       struct db_dest *pDB, *pDBfree;
        int irq, i, err = 0;
        struct resource *base, *macen;
 
@@ -1054,14 +1054,14 @@ static int __devinit au1000_probe(struct platform_device *pdev)
        }
 
        /* aup->mac is the base address of the MAC's registers */
-       aup->mac = (volatile mac_reg_t *)ioremap_nocache(base->start, resource_size(base));
+       aup->mac = (volatile struct mac_reg *)ioremap_nocache(base->start, resource_size(base));
        if (!aup->mac) {
                dev_err(&pdev->dev, "failed to ioremap MAC registers\n");
                err = -ENXIO;
                goto err_remap1;
        }
 
-        /* Setup some variables for quick register address access */
+       /* Setup some variables for quick register address access */
        aup->enable = (volatile u32 *)ioremap_nocache(macen->start, resource_size(macen));
        if (!aup->enable) {
                dev_err(&pdev->dev, "failed to ioremap MAC enable register\n");
@@ -1151,17 +1151,17 @@ static int __devinit au1000_probe(struct platform_device *pdev)
 
        for (i = 0; i < NUM_RX_DMA; i++) {
                pDB = au1000_GetFreeDB(aup);
-               if (!pDB) {
+               if (!pDB)
                        goto err_out;
-               }
+
                aup->rx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr;
                aup->rx_db_inuse[i] = pDB;
        }
        for (i = 0; i < NUM_TX_DMA; i++) {
                pDB = au1000_GetFreeDB(aup);
-               if (!pDB) {
+               if (!pDB)
                        goto err_out;
-               }
+
                aup->tx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr;
                aup->tx_dma_ring[i]->len = 0;
                aup->tx_db_inuse[i] = pDB;