Commit 62ff0d0a authored by Ralf Baechle's avatar Ralf Baechle Committed by Jeff Garzik

[PATCH] SAA9730: Whitespace cleanup.

Kill trailing whitespace, replace leading whitespace with tabs.
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>

 drivers/net/saa9730.c |   98 +++++++++++++++++++++++++-------------------------
 1 files changed, 49 insertions(+), 49 deletions(-)
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 7a33e45a
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
* *
* Changes: * Changes:
* Angelo Dell'Aera <buffer@antifork.org> : Conversion to the new PCI API (pci_driver). * Angelo Dell'Aera <buffer@antifork.org> : Conversion to the new PCI API (pci_driver).
* Conversion to spinlocks. * Conversion to spinlocks.
* Error handling fixes. * Error handling fixes.
* *
*/ */
#include <linux/init.h> #include <linux/init.h>
...@@ -52,7 +52,7 @@ int lan_saa9730_debug; ...@@ -52,7 +52,7 @@ int lan_saa9730_debug;
static struct pci_device_id saa9730_pci_tbl[] = { static struct pci_device_id saa9730_pci_tbl[] = {
{ PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA9370, { PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA9370,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
{ 0, } { 0, }
}; };
...@@ -61,7 +61,7 @@ MODULE_DEVICE_TABLE(pci, saa9730_pci_tbl); ...@@ -61,7 +61,7 @@ MODULE_DEVICE_TABLE(pci, saa9730_pci_tbl);
/* Non-zero only if the current card is a PCI with BIOS-set IRQ. */ /* Non-zero only if the current card is a PCI with BIOS-set IRQ. */
static unsigned int pci_irq_line; static unsigned int pci_irq_line;
#define INL(a) inl((unsigned long)a) #define INL(a) inl((unsigned long)a)
#define OUTL(x,a) outl(x,(unsigned long)a) #define OUTL(x,a) outl(x,(unsigned long)a)
static void evm_saa9730_enable_lan_int(struct lan_saa9730_private *lp) static void evm_saa9730_enable_lan_int(struct lan_saa9730_private *lp)
...@@ -221,8 +221,8 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp) ...@@ -221,8 +221,8 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp)
unsigned int i, j, RcvBufferSize, TxmBufferSize; unsigned int i, j, RcvBufferSize, TxmBufferSize;
unsigned int buffer_start; unsigned int buffer_start;
/* /*
* Allocate all RX and TX packets in one chunk. * Allocate all RX and TX packets in one chunk.
* The Rx and Tx packets must be PACKET_SIZE aligned. * The Rx and Tx packets must be PACKET_SIZE aligned.
*/ */
mem_size = ((LAN_SAA9730_RCV_Q_SIZE + LAN_SAA9730_TXM_Q_SIZE) * mem_size = ((LAN_SAA9730_RCV_Q_SIZE + LAN_SAA9730_TXM_Q_SIZE) *
...@@ -234,7 +234,7 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp) ...@@ -234,7 +234,7 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp)
if (!buffer_start) if (!buffer_start)
return -ENOMEM; return -ENOMEM;
/* /*
* Set DMA buffer to kseg1 (uncached). * Set DMA buffer to kseg1 (uncached).
* Make sure to flush before using it uncached. * Make sure to flush before using it uncached.
*/ */
...@@ -270,8 +270,8 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp) ...@@ -270,8 +270,8 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp)
} }
} }
/* /*
* Set rx buffer A and rx buffer B to point to the first two buffer * Set rx buffer A and rx buffer B to point to the first two buffer
* spaces. * spaces.
*/ */
OUTL(PHYSADDR(lp->RcvBuffer[0][0]), OUTL(PHYSADDR(lp->RcvBuffer[0][0]),
...@@ -289,9 +289,9 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp) ...@@ -289,9 +289,9 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp)
lp->PendingTxmPacketIndex = 0; lp->PendingTxmPacketIndex = 0;
lp->PendingTxmBufferIndex = 0; lp->PendingTxmBufferIndex = 0;
/* /*
* Set txm_buf_a and txm_buf_b to point to the first two buffer * Set txm_buf_a and txm_buf_b to point to the first two buffer
* space * space
*/ */
OUTL(PHYSADDR(lp->TxmBuffer[0][0]), OUTL(PHYSADDR(lp->TxmBuffer[0][0]),
&lp->lan_saa9730_regs->TxBuffA); &lp->lan_saa9730_regs->TxBuffA);
...@@ -469,9 +469,9 @@ static int lan_saa9730_control_init(struct lan_saa9730_private *lp) ...@@ -469,9 +469,9 @@ static int lan_saa9730_control_init(struct lan_saa9730_private *lp)
OUTL(CAM_CONTROL_COMP_EN | CAM_CONTROL_BROAD_ACC, OUTL(CAM_CONTROL_COMP_EN | CAM_CONTROL_BROAD_ACC,
&lp->lan_saa9730_regs->CamCtl); &lp->lan_saa9730_regs->CamCtl);
/* /*
* Initialize CAM enable register, only turn on first entry, should * Initialize CAM enable register, only turn on first entry, should
* contain own addr. * contain own addr.
*/ */
OUTL(0x0001, &lp->lan_saa9730_regs->CamEnable); OUTL(0x0001, &lp->lan_saa9730_regs->CamEnable);
...@@ -501,7 +501,7 @@ static int lan_saa9730_stop(struct lan_saa9730_private *lp) ...@@ -501,7 +501,7 @@ static int lan_saa9730_stop(struct lan_saa9730_private *lp)
OUTL(INL(&lp->lan_saa9730_regs->MacCtl) | MAC_CONTROL_RESET, OUTL(INL(&lp->lan_saa9730_regs->MacCtl) | MAC_CONTROL_RESET,
&lp->lan_saa9730_regs->MacCtl); &lp->lan_saa9730_regs->MacCtl);
/* /*
* Wait for MAC reset to have finished. The reset bit is auto cleared * Wait for MAC reset to have finished. The reset bit is auto cleared
* when the reset is done. * when the reset is done.
*/ */
...@@ -981,7 +981,7 @@ static void lan_saa9730_set_multicast(struct net_device *dev) ...@@ -981,7 +981,7 @@ static void lan_saa9730_set_multicast(struct net_device *dev)
CAM_CONTROL_BROAD_ACC, CAM_CONTROL_BROAD_ACC,
&lp->lan_saa9730_regs->CamCtl); &lp->lan_saa9730_regs->CamCtl);
} else { } else {
/* /*
* Will handle the multicast stuff later. -carstenl * Will handle the multicast stuff later. -carstenl
*/ */
} }
...@@ -993,16 +993,16 @@ static void lan_saa9730_set_multicast(struct net_device *dev) ...@@ -993,16 +993,16 @@ static void lan_saa9730_set_multicast(struct net_device *dev)
static void __devexit saa9730_remove_one(struct pci_dev *pdev) static void __devexit saa9730_remove_one(struct pci_dev *pdev)
{ {
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
if (dev) { if (dev) {
unregister_netdev(dev); unregister_netdev(dev);
kfree(dev->priv); kfree(dev->priv);
free_netdev(dev); free_netdev(dev);
pci_release_regions(pdev); pci_release_regions(pdev);
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
} }
} }
...@@ -1016,14 +1016,14 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq) ...@@ -1016,14 +1016,14 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq)
if (get_ethernet_addr(ethernet_addr)) if (get_ethernet_addr(ethernet_addr))
return -ENODEV; return -ENODEV;
memcpy(dev->dev_addr, ethernet_addr, 6); memcpy(dev->dev_addr, ethernet_addr, 6);
dev->base_addr = ioaddr; dev->base_addr = ioaddr;
dev->irq = irq; dev->irq = irq;
/* /*
* Make certain the data structures used by the controller are aligned * Make certain the data structures used by the controller are aligned
* and DMAble. * and DMAble.
*/ */
/* /*
* XXX: that is obviously broken - kfree() won't be happy with us. * XXX: that is obviously broken - kfree() won't be happy with us.
...@@ -1053,9 +1053,9 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq) ...@@ -1053,9 +1053,9 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq)
goto out; goto out;
/* Stop LAN controller. */ /* Stop LAN controller. */
if ((ret = lan_saa9730_stop(lp))) if ((ret = lan_saa9730_stop(lp)))
goto out; goto out;
/* Initialize CAM registers. */ /* Initialize CAM registers. */
if ((ret = lan_saa9730_cam_init(dev))) if ((ret = lan_saa9730_cam_init(dev)))
goto out; goto out;
...@@ -1065,19 +1065,19 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq) ...@@ -1065,19 +1065,19 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq)
goto out; goto out;
/* Initialize control registers. */ /* Initialize control registers. */
if ((ret = lan_saa9730_control_init(lp))) if ((ret = lan_saa9730_control_init(lp)))
goto out; goto out;
/* Load CAM registers. */ /* Load CAM registers. */
if ((ret = lan_saa9730_cam_load(lp))) if ((ret = lan_saa9730_cam_load(lp)))
goto out; goto out;
/* Initialize DMA context registers. */ /* Initialize DMA context registers. */
if ((ret = lan_saa9730_dma_init(lp))) if ((ret = lan_saa9730_dma_init(lp)))
goto out; goto out;
spin_lock_init(&lp->lock); spin_lock_init(&lp->lock);
dev->open = lan_saa9730_open; dev->open = lan_saa9730_open;
dev->hard_start_xmit = lan_saa9730_start_xmit; dev->hard_start_xmit = lan_saa9730_start_xmit;
dev->stop = lan_saa9730_close; dev->stop = lan_saa9730_close;
...@@ -1086,7 +1086,7 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq) ...@@ -1086,7 +1086,7 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq)
dev->tx_timeout = lan_saa9730_tx_timeout; dev->tx_timeout = lan_saa9730_tx_timeout;
dev->watchdog_timeo = (HZ >> 1); dev->watchdog_timeo = (HZ >> 1);
dev->dma = 0; dev->dma = 0;
ret = register_netdev(dev); ret = register_netdev(dev);
if (ret) if (ret)
goto out; goto out;
...@@ -1115,10 +1115,10 @@ static int __devinit saa9730_init_one(struct pci_dev *pdev, const struct pci_dev ...@@ -1115,10 +1115,10 @@ static int __devinit saa9730_init_one(struct pci_dev *pdev, const struct pci_dev
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
err = pci_enable_device(pdev); err = pci_enable_device(pdev);
if (err) { if (err) {
printk(KERN_ERR "Cannot enable PCI device, aborting.\n"); printk(KERN_ERR "Cannot enable PCI device, aborting.\n");
goto out1; goto out1;
} }
err = pci_request_regions(pdev, DRV_MODULE_NAME); err = pci_request_regions(pdev, DRV_MODULE_NAME);
if (err) { if (err) {
...@@ -1144,7 +1144,7 @@ static int __devinit saa9730_init_one(struct pci_dev *pdev, const struct pci_dev ...@@ -1144,7 +1144,7 @@ static int __devinit saa9730_init_one(struct pci_dev *pdev, const struct pci_dev
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
return 0; return 0;
out2: out2:
pci_disable_device(pdev); pci_disable_device(pdev);
out1: out1:
...@@ -1155,21 +1155,21 @@ static int __devinit saa9730_init_one(struct pci_dev *pdev, const struct pci_dev ...@@ -1155,21 +1155,21 @@ static int __devinit saa9730_init_one(struct pci_dev *pdev, const struct pci_dev
static struct pci_driver saa9730_driver = { static struct pci_driver saa9730_driver = {
.name = DRV_MODULE_NAME, .name = DRV_MODULE_NAME,
.id_table = saa9730_pci_tbl, .id_table = saa9730_pci_tbl,
.probe = saa9730_init_one, .probe = saa9730_init_one,
.remove = __devexit_p(saa9730_remove_one), .remove = __devexit_p(saa9730_remove_one),
}; };
static int __init saa9730_init(void) static int __init saa9730_init(void)
{ {
return pci_module_init(&saa9730_driver); return pci_module_init(&saa9730_driver);
} }
static void __exit saa9730_cleanup(void) static void __exit saa9730_cleanup(void)
{ {
pci_unregister_driver(&saa9730_driver); pci_unregister_driver(&saa9730_driver);
} }
module_init(saa9730_init); module_init(saa9730_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment