diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-11-09 11:44:02 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-11 08:31:35 -0500 |
commit | 62ff0d0a0769f08806d3f50449a78f17420971e8 (patch) | |
tree | 7a4908b104b68ffaf602d0659f73f1c315aa4b00 /drivers/net | |
parent | 7a33e45a2498460d6daa20a1740d3185798d6026 (diff) |
[PATCH] SAA9730: Whitespace cleanup.
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/saa9730.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/drivers/net/saa9730.c b/drivers/net/saa9730.c index 110e777f206e..451e78d241a0 100644 --- a/drivers/net/saa9730.c +++ b/drivers/net/saa9730.c | |||
@@ -23,9 +23,9 @@ | |||
23 | * | 23 | * |
24 | * Changes: | 24 | * Changes: |
25 | * Angelo Dell'Aera <buffer@antifork.org> : Conversion to the new PCI API (pci_driver). | 25 | * Angelo Dell'Aera <buffer@antifork.org> : Conversion to the new PCI API (pci_driver). |
26 | * Conversion to spinlocks. | 26 | * Conversion to spinlocks. |
27 | * Error handling fixes. | 27 | * Error handling fixes. |
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
@@ -52,7 +52,7 @@ int lan_saa9730_debug; | |||
52 | 52 | ||
53 | static struct pci_device_id saa9730_pci_tbl[] = { | 53 | static struct pci_device_id saa9730_pci_tbl[] = { |
54 | { PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA9370, | 54 | { PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA9370, |
55 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 55 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
56 | { 0, } | 56 | { 0, } |
57 | }; | 57 | }; |
58 | 58 | ||
@@ -61,7 +61,7 @@ MODULE_DEVICE_TABLE(pci, saa9730_pci_tbl); | |||
61 | /* Non-zero only if the current card is a PCI with BIOS-set IRQ. */ | 61 | /* Non-zero only if the current card is a PCI with BIOS-set IRQ. */ |
62 | static unsigned int pci_irq_line; | 62 | static unsigned int pci_irq_line; |
63 | 63 | ||
64 | #define INL(a) inl((unsigned long)a) | 64 | #define INL(a) inl((unsigned long)a) |
65 | #define OUTL(x,a) outl(x,(unsigned long)a) | 65 | #define OUTL(x,a) outl(x,(unsigned long)a) |
66 | 66 | ||
67 | static void evm_saa9730_enable_lan_int(struct lan_saa9730_private *lp) | 67 | 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 | unsigned int i, j, RcvBufferSize, TxmBufferSize; | 221 | unsigned int i, j, RcvBufferSize, TxmBufferSize; |
222 | unsigned int buffer_start; | 222 | unsigned int buffer_start; |
223 | 223 | ||
224 | /* | 224 | /* |
225 | * Allocate all RX and TX packets in one chunk. | 225 | * Allocate all RX and TX packets in one chunk. |
226 | * The Rx and Tx packets must be PACKET_SIZE aligned. | 226 | * The Rx and Tx packets must be PACKET_SIZE aligned. |
227 | */ | 227 | */ |
228 | mem_size = ((LAN_SAA9730_RCV_Q_SIZE + LAN_SAA9730_TXM_Q_SIZE) * | 228 | 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 | if (!buffer_start) | 234 | if (!buffer_start) |
235 | return -ENOMEM; | 235 | return -ENOMEM; |
236 | 236 | ||
237 | /* | 237 | /* |
238 | * Set DMA buffer to kseg1 (uncached). | 238 | * Set DMA buffer to kseg1 (uncached). |
239 | * Make sure to flush before using it uncached. | 239 | * Make sure to flush before using it uncached. |
240 | */ | 240 | */ |
@@ -270,8 +270,8 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp) | |||
270 | } | 270 | } |
271 | } | 271 | } |
272 | 272 | ||
273 | /* | 273 | /* |
274 | * Set rx buffer A and rx buffer B to point to the first two buffer | 274 | * Set rx buffer A and rx buffer B to point to the first two buffer |
275 | * spaces. | 275 | * spaces. |
276 | */ | 276 | */ |
277 | OUTL(PHYSADDR(lp->RcvBuffer[0][0]), | 277 | OUTL(PHYSADDR(lp->RcvBuffer[0][0]), |
@@ -289,9 +289,9 @@ static int lan_saa9730_allocate_buffers(struct lan_saa9730_private *lp) | |||
289 | lp->PendingTxmPacketIndex = 0; | 289 | lp->PendingTxmPacketIndex = 0; |
290 | lp->PendingTxmBufferIndex = 0; | 290 | lp->PendingTxmBufferIndex = 0; |
291 | 291 | ||
292 | /* | 292 | /* |
293 | * Set txm_buf_a and txm_buf_b to point to the first two buffer | 293 | * Set txm_buf_a and txm_buf_b to point to the first two buffer |
294 | * space | 294 | * space |
295 | */ | 295 | */ |
296 | OUTL(PHYSADDR(lp->TxmBuffer[0][0]), | 296 | OUTL(PHYSADDR(lp->TxmBuffer[0][0]), |
297 | &lp->lan_saa9730_regs->TxBuffA); | 297 | &lp->lan_saa9730_regs->TxBuffA); |
@@ -469,9 +469,9 @@ static int lan_saa9730_control_init(struct lan_saa9730_private *lp) | |||
469 | OUTL(CAM_CONTROL_COMP_EN | CAM_CONTROL_BROAD_ACC, | 469 | OUTL(CAM_CONTROL_COMP_EN | CAM_CONTROL_BROAD_ACC, |
470 | &lp->lan_saa9730_regs->CamCtl); | 470 | &lp->lan_saa9730_regs->CamCtl); |
471 | 471 | ||
472 | /* | 472 | /* |
473 | * Initialize CAM enable register, only turn on first entry, should | 473 | * Initialize CAM enable register, only turn on first entry, should |
474 | * contain own addr. | 474 | * contain own addr. |
475 | */ | 475 | */ |
476 | OUTL(0x0001, &lp->lan_saa9730_regs->CamEnable); | 476 | OUTL(0x0001, &lp->lan_saa9730_regs->CamEnable); |
477 | 477 | ||
@@ -501,7 +501,7 @@ static int lan_saa9730_stop(struct lan_saa9730_private *lp) | |||
501 | OUTL(INL(&lp->lan_saa9730_regs->MacCtl) | MAC_CONTROL_RESET, | 501 | OUTL(INL(&lp->lan_saa9730_regs->MacCtl) | MAC_CONTROL_RESET, |
502 | &lp->lan_saa9730_regs->MacCtl); | 502 | &lp->lan_saa9730_regs->MacCtl); |
503 | 503 | ||
504 | /* | 504 | /* |
505 | * Wait for MAC reset to have finished. The reset bit is auto cleared | 505 | * Wait for MAC reset to have finished. The reset bit is auto cleared |
506 | * when the reset is done. | 506 | * when the reset is done. |
507 | */ | 507 | */ |
@@ -981,7 +981,7 @@ static void lan_saa9730_set_multicast(struct net_device *dev) | |||
981 | CAM_CONTROL_BROAD_ACC, | 981 | CAM_CONTROL_BROAD_ACC, |
982 | &lp->lan_saa9730_regs->CamCtl); | 982 | &lp->lan_saa9730_regs->CamCtl); |
983 | } else { | 983 | } else { |
984 | /* | 984 | /* |
985 | * Will handle the multicast stuff later. -carstenl | 985 | * Will handle the multicast stuff later. -carstenl |
986 | */ | 986 | */ |
987 | } | 987 | } |
@@ -993,16 +993,16 @@ static void lan_saa9730_set_multicast(struct net_device *dev) | |||
993 | 993 | ||
994 | static void __devexit saa9730_remove_one(struct pci_dev *pdev) | 994 | static void __devexit saa9730_remove_one(struct pci_dev *pdev) |
995 | { | 995 | { |
996 | struct net_device *dev = pci_get_drvdata(pdev); | 996 | struct net_device *dev = pci_get_drvdata(pdev); |
997 | 997 | ||
998 | if (dev) { | 998 | if (dev) { |
999 | unregister_netdev(dev); | 999 | unregister_netdev(dev); |
1000 | kfree(dev->priv); | 1000 | kfree(dev->priv); |
1001 | free_netdev(dev); | 1001 | free_netdev(dev); |
1002 | pci_release_regions(pdev); | 1002 | pci_release_regions(pdev); |
1003 | pci_disable_device(pdev); | 1003 | pci_disable_device(pdev); |
1004 | pci_set_drvdata(pdev, NULL); | 1004 | pci_set_drvdata(pdev, NULL); |
1005 | } | 1005 | } |
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | 1008 | ||
@@ -1016,14 +1016,14 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq) | |||
1016 | 1016 | ||
1017 | if (get_ethernet_addr(ethernet_addr)) | 1017 | if (get_ethernet_addr(ethernet_addr)) |
1018 | return -ENODEV; | 1018 | return -ENODEV; |
1019 | 1019 | ||
1020 | memcpy(dev->dev_addr, ethernet_addr, 6); | 1020 | memcpy(dev->dev_addr, ethernet_addr, 6); |
1021 | dev->base_addr = ioaddr; | 1021 | dev->base_addr = ioaddr; |
1022 | dev->irq = irq; | 1022 | dev->irq = irq; |
1023 | 1023 | ||
1024 | /* | 1024 | /* |
1025 | * Make certain the data structures used by the controller are aligned | 1025 | * Make certain the data structures used by the controller are aligned |
1026 | * and DMAble. | 1026 | * and DMAble. |
1027 | */ | 1027 | */ |
1028 | /* | 1028 | /* |
1029 | * XXX: that is obviously broken - kfree() won't be happy with us. | 1029 | * 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 | goto out; | 1053 | goto out; |
1054 | 1054 | ||
1055 | /* Stop LAN controller. */ | 1055 | /* Stop LAN controller. */ |
1056 | if ((ret = lan_saa9730_stop(lp))) | 1056 | if ((ret = lan_saa9730_stop(lp))) |
1057 | goto out; | 1057 | goto out; |
1058 | 1058 | ||
1059 | /* Initialize CAM registers. */ | 1059 | /* Initialize CAM registers. */ |
1060 | if ((ret = lan_saa9730_cam_init(dev))) | 1060 | if ((ret = lan_saa9730_cam_init(dev))) |
1061 | goto out; | 1061 | goto out; |
@@ -1065,19 +1065,19 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq) | |||
1065 | goto out; | 1065 | goto out; |
1066 | 1066 | ||
1067 | /* Initialize control registers. */ | 1067 | /* Initialize control registers. */ |
1068 | if ((ret = lan_saa9730_control_init(lp))) | 1068 | if ((ret = lan_saa9730_control_init(lp))) |
1069 | goto out; | 1069 | goto out; |
1070 | 1070 | ||
1071 | /* Load CAM registers. */ | 1071 | /* Load CAM registers. */ |
1072 | if ((ret = lan_saa9730_cam_load(lp))) | 1072 | if ((ret = lan_saa9730_cam_load(lp))) |
1073 | goto out; | 1073 | goto out; |
1074 | 1074 | ||
1075 | /* Initialize DMA context registers. */ | 1075 | /* Initialize DMA context registers. */ |
1076 | if ((ret = lan_saa9730_dma_init(lp))) | 1076 | if ((ret = lan_saa9730_dma_init(lp))) |
1077 | goto out; | 1077 | goto out; |
1078 | 1078 | ||
1079 | spin_lock_init(&lp->lock); | 1079 | spin_lock_init(&lp->lock); |
1080 | 1080 | ||
1081 | dev->open = lan_saa9730_open; | 1081 | dev->open = lan_saa9730_open; |
1082 | dev->hard_start_xmit = lan_saa9730_start_xmit; | 1082 | dev->hard_start_xmit = lan_saa9730_start_xmit; |
1083 | dev->stop = lan_saa9730_close; | 1083 | dev->stop = lan_saa9730_close; |
@@ -1086,7 +1086,7 @@ static int lan_saa9730_init(struct net_device *dev, int ioaddr, int irq) | |||
1086 | dev->tx_timeout = lan_saa9730_tx_timeout; | 1086 | dev->tx_timeout = lan_saa9730_tx_timeout; |
1087 | dev->watchdog_timeo = (HZ >> 1); | 1087 | dev->watchdog_timeo = (HZ >> 1); |
1088 | dev->dma = 0; | 1088 | dev->dma = 0; |
1089 | 1089 | ||
1090 | ret = register_netdev(dev); | 1090 | ret = register_netdev(dev); |
1091 | if (ret) | 1091 | if (ret) |
1092 | goto out; | 1092 | goto out; |
@@ -1115,10 +1115,10 @@ static int __devinit saa9730_init_one(struct pci_dev *pdev, const struct pci_dev | |||
1115 | SET_MODULE_OWNER(dev); | 1115 | SET_MODULE_OWNER(dev); |
1116 | 1116 | ||
1117 | err = pci_enable_device(pdev); | 1117 | err = pci_enable_device(pdev); |
1118 | if (err) { | 1118 | if (err) { |
1119 | printk(KERN_ERR "Cannot enable PCI device, aborting.\n"); | 1119 | printk(KERN_ERR "Cannot enable PCI device, aborting.\n"); |
1120 | goto out1; | 1120 | goto out1; |
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | err = pci_request_regions(pdev, DRV_MODULE_NAME); | 1123 | err = pci_request_regions(pdev, DRV_MODULE_NAME); |
1124 | if (err) { | 1124 | if (err) { |
@@ -1144,7 +1144,7 @@ static int __devinit saa9730_init_one(struct pci_dev *pdev, const struct pci_dev | |||
1144 | pci_set_drvdata(pdev, dev); | 1144 | pci_set_drvdata(pdev, dev); |
1145 | SET_NETDEV_DEV(dev, &pdev->dev); | 1145 | SET_NETDEV_DEV(dev, &pdev->dev); |
1146 | return 0; | 1146 | return 0; |
1147 | 1147 | ||
1148 | out2: | 1148 | out2: |
1149 | pci_disable_device(pdev); | 1149 | pci_disable_device(pdev); |
1150 | out1: | 1150 | out1: |
@@ -1155,21 +1155,21 @@ out: | |||
1155 | 1155 | ||
1156 | 1156 | ||
1157 | static struct pci_driver saa9730_driver = { | 1157 | static struct pci_driver saa9730_driver = { |
1158 | .name = DRV_MODULE_NAME, | 1158 | .name = DRV_MODULE_NAME, |
1159 | .id_table = saa9730_pci_tbl, | 1159 | .id_table = saa9730_pci_tbl, |
1160 | .probe = saa9730_init_one, | 1160 | .probe = saa9730_init_one, |
1161 | .remove = __devexit_p(saa9730_remove_one), | 1161 | .remove = __devexit_p(saa9730_remove_one), |
1162 | }; | 1162 | }; |
1163 | 1163 | ||
1164 | 1164 | ||
1165 | static int __init saa9730_init(void) | 1165 | static int __init saa9730_init(void) |
1166 | { | 1166 | { |
1167 | return pci_module_init(&saa9730_driver); | 1167 | return pci_module_init(&saa9730_driver); |
1168 | } | 1168 | } |
1169 | 1169 | ||
1170 | static void __exit saa9730_cleanup(void) | 1170 | static void __exit saa9730_cleanup(void) |
1171 | { | 1171 | { |
1172 | pci_unregister_driver(&saa9730_driver); | 1172 | pci_unregister_driver(&saa9730_driver); |
1173 | } | 1173 | } |
1174 | 1174 | ||
1175 | module_init(saa9730_init); | 1175 | module_init(saa9730_init); |