Kill trailing whitespace, replace leading whitespace with tabs.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/net/saa9730.c | 98 +++++++++++++++++++++++++-------------------------
1 files changed, 49 insertions(+), 49 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
*
* Changes:
* Angelo Dell'Aera <buffer@antifork.org> : Conversion to the new PCI API (pci_driver).
*
* Changes:
* Angelo Dell'Aera <buffer@antifork.org> : Conversion to the new PCI API (pci_driver).
- * Conversion to spinlocks.
- * Error handling fixes.
- *
+ * Conversion to spinlocks.
+ * Error handling fixes.
+ *
*/
#include <linux/init.h>
*/
#include <linux/init.h>
static struct pci_device_id saa9730_pci_tbl[] = {
{ PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA9370,
static struct pci_device_id saa9730_pci_tbl[] = {
{ 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 },
/* Non-zero only if the current card is a PCI with BIOS-set IRQ. */
static unsigned int pci_irq_line;
/* Non-zero only if the current card is a PCI with BIOS-set IRQ. */
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)
static void evm_saa9730_enable_lan_int(struct lan_saa9730_private *lp)
#define OUTL(x,a) outl(x,(unsigned long)a)
static void evm_saa9730_enable_lan_int(struct lan_saa9730_private *lp)
unsigned int i, j, RcvBufferSize, TxmBufferSize;
unsigned int buffer_start;
unsigned int i, j, RcvBufferSize, TxmBufferSize;
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.
*/
mem_size = ((LAN_SAA9730_RCV_Q_SIZE + LAN_SAA9730_TXM_Q_SIZE) *
* The Rx and Tx packets must be PACKET_SIZE aligned.
*/
mem_size = ((LAN_SAA9730_RCV_Q_SIZE + LAN_SAA9730_TXM_Q_SIZE) *
if (!buffer_start)
return -ENOMEM;
if (!buffer_start)
return -ENOMEM;
* Set DMA buffer to kseg1 (uncached).
* Make sure to flush before using it uncached.
*/
* Set DMA buffer to kseg1 (uncached).
* Make sure to flush before using it uncached.
*/
- /*
- * 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.
*/
OUTL(PHYSADDR(lp->RcvBuffer[0][0]),
* spaces.
*/
OUTL(PHYSADDR(lp->RcvBuffer[0][0]),
lp->PendingTxmPacketIndex = 0;
lp->PendingTxmBufferIndex = 0;
lp->PendingTxmPacketIndex = 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
*/
OUTL(PHYSADDR(lp->TxmBuffer[0][0]),
&lp->lan_saa9730_regs->TxBuffA);
*/
OUTL(PHYSADDR(lp->TxmBuffer[0][0]),
&lp->lan_saa9730_regs->TxBuffA);
OUTL(CAM_CONTROL_COMP_EN | CAM_CONTROL_BROAD_ACC,
&lp->lan_saa9730_regs->CamCtl);
OUTL(CAM_CONTROL_COMP_EN | CAM_CONTROL_BROAD_ACC,
&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
*/
OUTL(0x0001, &lp->lan_saa9730_regs->CamEnable);
*/
OUTL(0x0001, &lp->lan_saa9730_regs->CamEnable);
OUTL(INL(&lp->lan_saa9730_regs->MacCtl) | MAC_CONTROL_RESET,
&lp->lan_saa9730_regs->MacCtl);
OUTL(INL(&lp->lan_saa9730_regs->MacCtl) | MAC_CONTROL_RESET,
&lp->lan_saa9730_regs->MacCtl);
* Wait for MAC reset to have finished. The reset bit is auto cleared
* when the reset is done.
*/
* Wait for MAC reset to have finished. The reset bit is auto cleared
* when the reset is done.
*/
CAM_CONTROL_BROAD_ACC,
&lp->lan_saa9730_regs->CamCtl);
} else {
CAM_CONTROL_BROAD_ACC,
&lp->lan_saa9730_regs->CamCtl);
} else {
* Will handle the multicast stuff later. -carstenl
*/
}
* Will handle the multicast stuff later. -carstenl
*/
}
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) {
- unregister_netdev(dev);
+ if (dev) {
+ unregister_netdev(dev);
- free_netdev(dev);
- pci_release_regions(pdev);
- pci_disable_device(pdev);
- pci_set_drvdata(pdev, NULL);
- }
+ free_netdev(dev);
+ pci_release_regions(pdev);
+ pci_disable_device(pdev);
+ pci_set_drvdata(pdev, NULL);
+ }
if (get_ethernet_addr(ethernet_addr))
return -ENODEV;
if (get_ethernet_addr(ethernet_addr))
return -ENODEV;
memcpy(dev->dev_addr, ethernet_addr, 6);
dev->base_addr = ioaddr;
dev->irq = irq;
memcpy(dev->dev_addr, ethernet_addr, 6);
dev->base_addr = ioaddr;
dev->irq = irq;
-
- /*
- * Make certain the data structures used by the controller are aligned
- * and DMAble.
+
+ /*
+ * Make certain the data structures used by the controller are aligned
+ * 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.
goto out;
/* Stop LAN controller. */
goto out;
/* Stop LAN controller. */
- if ((ret = lan_saa9730_stop(lp)))
+ if ((ret = lan_saa9730_stop(lp)))
/* Initialize CAM registers. */
if ((ret = lan_saa9730_cam_init(dev)))
goto out;
/* Initialize CAM registers. */
if ((ret = lan_saa9730_cam_init(dev)))
goto out;
goto out;
/* Initialize control registers. */
goto out;
/* Initialize control registers. */
- if ((ret = lan_saa9730_control_init(lp)))
+ if ((ret = lan_saa9730_control_init(lp)))
/* Load CAM registers. */
/* Load CAM registers. */
- if ((ret = lan_saa9730_cam_load(lp)))
+ if ((ret = lan_saa9730_cam_load(lp)))
/* Initialize DMA context registers. */
if ((ret = lan_saa9730_dma_init(lp)))
goto out;
/* Initialize DMA context registers. */
if ((ret = lan_saa9730_dma_init(lp)))
goto out;
spin_lock_init(&lp->lock);
spin_lock_init(&lp->lock);
dev->open = lan_saa9730_open;
dev->hard_start_xmit = lan_saa9730_start_xmit;
dev->stop = lan_saa9730_close;
dev->open = lan_saa9730_open;
dev->hard_start_xmit = lan_saa9730_start_xmit;
dev->stop = lan_saa9730_close;
dev->tx_timeout = lan_saa9730_tx_timeout;
dev->watchdog_timeo = (HZ >> 1);
dev->dma = 0;
dev->tx_timeout = lan_saa9730_tx_timeout;
dev->watchdog_timeo = (HZ >> 1);
dev->dma = 0;
ret = register_netdev(dev);
if (ret)
goto out;
ret = register_netdev(dev);
if (ret)
goto out;
SET_MODULE_OWNER(dev);
err = pci_enable_device(pdev);
SET_MODULE_OWNER(dev);
err = pci_enable_device(pdev);
- if (err) {
- printk(KERN_ERR "Cannot enable PCI device, aborting.\n");
- goto out1;
- }
+ if (err) {
+ printk(KERN_ERR "Cannot enable PCI device, aborting.\n");
+ goto out1;
+ }
err = pci_request_regions(pdev, DRV_MODULE_NAME);
if (err) {
err = pci_request_regions(pdev, DRV_MODULE_NAME);
if (err) {
pci_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);
return 0;
pci_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);
return 0;
out2:
pci_disable_device(pdev);
out1:
out2:
pci_disable_device(pdev);
out1:
static struct pci_driver saa9730_driver = {
static struct pci_driver saa9730_driver = {
- .name = DRV_MODULE_NAME,
- .id_table = saa9730_pci_tbl,
- .probe = saa9730_init_one,
- .remove = __devexit_p(saa9730_remove_one),
+ .name = DRV_MODULE_NAME,
+ .id_table = saa9730_pci_tbl,
+ .probe = saa9730_init_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);