Commit a880c4cd authored by Steffen Klassert's avatar Steffen Klassert Committed by Linus Torvalds

[PATCH] 3c59x: minor cleanups

Remove some whitespaces and codingstyle issues.
Signed-off-by: default avatarSteffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 61238602
...@@ -900,7 +900,6 @@ static void acpi_set_WOL(struct net_device *dev); ...@@ -900,7 +900,6 @@ static void acpi_set_WOL(struct net_device *dev);
static struct ethtool_ops vortex_ethtool_ops; static struct ethtool_ops vortex_ethtool_ops;
static void set_8021q_mode(struct net_device *dev, int enable); static void set_8021q_mode(struct net_device *dev, int enable);
/* This driver uses 'options' to pass the media type, full-duplex flag, etc. */ /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
/* Option count limit only -- unlimited interfaces are supported. */ /* Option count limit only -- unlimited interfaces are supported. */
#define MAX_UNITS 8 #define MAX_UNITS 8
...@@ -915,8 +914,6 @@ static int global_full_duplex = -1; ...@@ -915,8 +914,6 @@ static int global_full_duplex = -1;
static int global_enable_wol = -1; static int global_enable_wol = -1;
static int global_use_mmio = -1; static int global_use_mmio = -1;
/* #define dev_alloc_skb dev_alloc_skb_debug */
/* Variables to work-around the Compaq PCI BIOS32 problem. */ /* Variables to work-around the Compaq PCI BIOS32 problem. */
static int compaq_ioaddr, compaq_irq, compaq_device_id = 0x5900; static int compaq_ioaddr, compaq_irq, compaq_device_id = 0x5900;
static struct net_device *compaq_net_device; static struct net_device *compaq_net_device;
...@@ -972,7 +969,7 @@ static void poll_vortex(struct net_device *dev) ...@@ -972,7 +969,7 @@ static void poll_vortex(struct net_device *dev)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int vortex_suspend (struct pci_dev *pdev, pm_message_t state) static int vortex_suspend(struct pci_dev *pdev, pm_message_t state)
{ {
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
...@@ -990,7 +987,7 @@ static int vortex_suspend (struct pci_dev *pdev, pm_message_t state) ...@@ -990,7 +987,7 @@ static int vortex_suspend (struct pci_dev *pdev, pm_message_t state)
return 0; return 0;
} }
static int vortex_resume (struct pci_dev *pdev) static int vortex_resume(struct pci_dev *pdev)
{ {
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
struct vortex_private *vp = netdev_priv(dev); struct vortex_private *vp = netdev_priv(dev);
...@@ -1023,8 +1020,8 @@ static struct eisa_device_id vortex_eisa_ids[] = { ...@@ -1023,8 +1020,8 @@ static struct eisa_device_id vortex_eisa_ids[] = {
{ "" } { "" }
}; };
static int vortex_eisa_probe (struct device *device); static int vortex_eisa_probe(struct device *device);
static int vortex_eisa_remove (struct device *device); static int vortex_eisa_remove(struct device *device);
static struct eisa_driver vortex_eisa_driver = { static struct eisa_driver vortex_eisa_driver = {
.id_table = vortex_eisa_ids, .id_table = vortex_eisa_ids,
...@@ -1035,12 +1032,12 @@ static struct eisa_driver vortex_eisa_driver = { ...@@ -1035,12 +1032,12 @@ static struct eisa_driver vortex_eisa_driver = {
} }
}; };
static int vortex_eisa_probe (struct device *device) static int vortex_eisa_probe(struct device *device)
{ {
void __iomem *ioaddr; void __iomem *ioaddr;
struct eisa_device *edev; struct eisa_device *edev;
edev = to_eisa_device (device); edev = to_eisa_device(device);
if (!request_region(edev->base_addr, VORTEX_TOTAL_SIZE, DRV_NAME)) if (!request_region(edev->base_addr, VORTEX_TOTAL_SIZE, DRV_NAME))
return -EBUSY; return -EBUSY;
...@@ -1049,7 +1046,7 @@ static int vortex_eisa_probe (struct device *device) ...@@ -1049,7 +1046,7 @@ static int vortex_eisa_probe (struct device *device)
if (vortex_probe1(device, ioaddr, ioread16(ioaddr + 0xC88) >> 12, if (vortex_probe1(device, ioaddr, ioread16(ioaddr + 0xC88) >> 12,
edev->id.driver_data, vortex_cards_found)) { edev->id.driver_data, vortex_cards_found)) {
release_region (edev->base_addr, VORTEX_TOTAL_SIZE); release_region(edev->base_addr, VORTEX_TOTAL_SIZE);
return -ENODEV; return -ENODEV;
} }
...@@ -1058,15 +1055,15 @@ static int vortex_eisa_probe (struct device *device) ...@@ -1058,15 +1055,15 @@ static int vortex_eisa_probe (struct device *device)
return 0; return 0;
} }
static int vortex_eisa_remove (struct device *device) static int vortex_eisa_remove(struct device *device)
{ {
struct eisa_device *edev; struct eisa_device *edev;
struct net_device *dev; struct net_device *dev;
struct vortex_private *vp; struct vortex_private *vp;
void __iomem *ioaddr; void __iomem *ioaddr;
edev = to_eisa_device (device); edev = to_eisa_device(device);
dev = eisa_get_drvdata (edev); dev = eisa_get_drvdata(edev);
if (!dev) { if (!dev) {
printk("vortex_eisa_remove called for Compaq device!\n"); printk("vortex_eisa_remove called for Compaq device!\n");
...@@ -1076,17 +1073,17 @@ static int vortex_eisa_remove (struct device *device) ...@@ -1076,17 +1073,17 @@ static int vortex_eisa_remove (struct device *device)
vp = netdev_priv(dev); vp = netdev_priv(dev);
ioaddr = vp->ioaddr; ioaddr = vp->ioaddr;
unregister_netdev (dev); unregister_netdev(dev);
iowrite16 (TotalReset|0x14, ioaddr + EL3_CMD); iowrite16(TotalReset|0x14, ioaddr + EL3_CMD);
release_region (dev->base_addr, VORTEX_TOTAL_SIZE); release_region(dev->base_addr, VORTEX_TOTAL_SIZE);
free_netdev (dev); free_netdev(dev);
return 0; return 0;
} }
#endif #endif
/* returns count found (>= 0), or negative on error */ /* returns count found (>= 0), or negative on error */
static int __init vortex_eisa_init (void) static int __init vortex_eisa_init(void)
{ {
int eisa_found = 0; int eisa_found = 0;
int orig_cards_found = vortex_cards_found; int orig_cards_found = vortex_cards_found;
...@@ -1117,7 +1114,7 @@ static int __init vortex_eisa_init (void) ...@@ -1117,7 +1114,7 @@ static int __init vortex_eisa_init (void)
} }
/* returns count (>= 0), or negative on error */ /* returns count (>= 0), or negative on error */
static int __devinit vortex_init_one (struct pci_dev *pdev, static int __devinit vortex_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
int rc, unit, pci_bar; int rc, unit, pci_bar;
...@@ -1125,7 +1122,7 @@ static int __devinit vortex_init_one (struct pci_dev *pdev, ...@@ -1125,7 +1122,7 @@ static int __devinit vortex_init_one (struct pci_dev *pdev,
void __iomem *ioaddr; void __iomem *ioaddr;
/* wake up and enable device */ /* wake up and enable device */
rc = pci_enable_device (pdev); rc = pci_enable_device(pdev);
if (rc < 0) if (rc < 0)
goto out; goto out;
...@@ -1147,7 +1144,7 @@ static int __devinit vortex_init_one (struct pci_dev *pdev, ...@@ -1147,7 +1144,7 @@ static int __devinit vortex_init_one (struct pci_dev *pdev,
rc = vortex_probe1(&pdev->dev, ioaddr, pdev->irq, rc = vortex_probe1(&pdev->dev, ioaddr, pdev->irq,
ent->driver_data, unit); ent->driver_data, unit);
if (rc < 0) { if (rc < 0) {
pci_disable_device (pdev); pci_disable_device(pdev);
goto out; goto out;
} }
...@@ -1262,7 +1259,7 @@ static int __devinit vortex_probe1(struct device *gendev, ...@@ -1262,7 +1259,7 @@ static int __devinit vortex_probe1(struct device *gendev,
/* enable bus-mastering if necessary */ /* enable bus-mastering if necessary */
if (vci->flags & PCI_USES_MASTER) if (vci->flags & PCI_USES_MASTER)
pci_set_master (pdev); pci_set_master(pdev);
if (vci->drv_flags & IS_VORTEX) { if (vci->drv_flags & IS_VORTEX) {
u8 pci_latency; u8 pci_latency;
...@@ -1306,7 +1303,7 @@ static int __devinit vortex_probe1(struct device *gendev, ...@@ -1306,7 +1303,7 @@ static int __devinit vortex_probe1(struct device *gendev,
if (pdev) if (pdev)
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
if (edev) if (edev)
eisa_set_drvdata (edev, dev); eisa_set_drvdata(edev, dev);
vp->media_override = 7; vp->media_override = 7;
if (option >= 0) { if (option >= 0) {
...@@ -1808,7 +1805,6 @@ vortex_up(struct net_device *dev) ...@@ -1808,7 +1805,6 @@ vortex_up(struct net_device *dev)
set_8021q_mode(dev, 1); set_8021q_mode(dev, 1);
iowrite16(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */ iowrite16(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */
// issue_and_wait(dev, SetTxStart|0x07ff);
iowrite16(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */ iowrite16(RxEnable, ioaddr + EL3_CMD); /* Enable the receiver. */
iowrite16(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */ iowrite16(TxEnable, ioaddr + EL3_CMD); /* Enable transmitter. */
/* Allow status bits to be seen. */ /* Allow status bits to be seen. */
...@@ -1944,7 +1940,7 @@ vortex_timer(unsigned long data) ...@@ -1944,7 +1940,7 @@ vortex_timer(unsigned long data)
if (vp->medialock) if (vp->medialock)
goto leave_media_alone; goto leave_media_alone;
if ( ! ok) { if (!ok) {
unsigned int config; unsigned int config;
do { do {
...@@ -2179,7 +2175,7 @@ vortex_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -2179,7 +2175,7 @@ vortex_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (vp->bus_master) { if (vp->bus_master) {
/* Set the bus-master controller to transfer the packet. */ /* Set the bus-master controller to transfer the packet. */
int len = (skb->len + 3) & ~3; int len = (skb->len + 3) & ~3;
iowrite32( vp->tx_skb_dma = pci_map_single(VORTEX_PCI(vp), skb->data, len, PCI_DMA_TODEVICE), iowrite32(vp->tx_skb_dma = pci_map_single(VORTEX_PCI(vp), skb->data, len, PCI_DMA_TODEVICE),
ioaddr + Wn7_MasterAddr); ioaddr + Wn7_MasterAddr);
iowrite16(len, ioaddr + Wn7_MasterLen); iowrite16(len, ioaddr + Wn7_MasterLen);
vp->tx_skb = skb; vp->tx_skb = skb;
...@@ -3058,7 +3054,7 @@ static struct ethtool_ops vortex_ethtool_ops = { ...@@ -3058,7 +3054,7 @@ static struct ethtool_ops vortex_ethtool_ops = {
.set_settings = vortex_set_settings, .set_settings = vortex_set_settings,
.get_link = ethtool_op_get_link, .get_link = ethtool_op_get_link,
.nway_reset = vortex_nway_reset, .nway_reset = vortex_nway_reset,
.get_perm_addr = ethtool_op_get_perm_addr, .get_perm_addr = ethtool_op_get_perm_addr,
}; };
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
...@@ -3259,7 +3255,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val ...@@ -3259,7 +3255,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val
} }
return; return;
} }
/* ACPI: Advanced Configuration and Power Interface. */ /* ACPI: Advanced Configuration and Power Interface. */
/* Set Wake-On-LAN mode and put the board into D3 (power-down) state. */ /* Set Wake-On-LAN mode and put the board into D3 (power-down) state. */
static void acpi_set_WOL(struct net_device *dev) static void acpi_set_WOL(struct net_device *dev)
...@@ -3283,7 +3279,7 @@ static void acpi_set_WOL(struct net_device *dev) ...@@ -3283,7 +3279,7 @@ static void acpi_set_WOL(struct net_device *dev)
} }
static void __devexit vortex_remove_one (struct pci_dev *pdev) static void __devexit vortex_remove_one(struct pci_dev *pdev)
{ {
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
struct vortex_private *vp; struct vortex_private *vp;
...@@ -3339,7 +3335,7 @@ static int vortex_have_pci; ...@@ -3339,7 +3335,7 @@ static int vortex_have_pci;
static int vortex_have_eisa; static int vortex_have_eisa;
static int __init vortex_init (void) static int __init vortex_init(void)
{ {
int pci_rc, eisa_rc; int pci_rc, eisa_rc;
...@@ -3355,14 +3351,14 @@ static int __init vortex_init (void) ...@@ -3355,14 +3351,14 @@ static int __init vortex_init (void)
} }
static void __exit vortex_eisa_cleanup (void) static void __exit vortex_eisa_cleanup(void)
{ {
struct vortex_private *vp; struct vortex_private *vp;
void __iomem *ioaddr; void __iomem *ioaddr;
#ifdef CONFIG_EISA #ifdef CONFIG_EISA
/* Take care of the EISA devices */ /* Take care of the EISA devices */
eisa_driver_unregister (&vortex_eisa_driver); eisa_driver_unregister(&vortex_eisa_driver);
#endif #endif
if (compaq_net_device) { if (compaq_net_device) {
...@@ -3370,33 +3366,24 @@ static void __exit vortex_eisa_cleanup (void) ...@@ -3370,33 +3366,24 @@ static void __exit vortex_eisa_cleanup (void)
ioaddr = ioport_map(compaq_net_device->base_addr, ioaddr = ioport_map(compaq_net_device->base_addr,
VORTEX_TOTAL_SIZE); VORTEX_TOTAL_SIZE);
unregister_netdev (compaq_net_device); unregister_netdev(compaq_net_device);
iowrite16 (TotalReset, ioaddr + EL3_CMD); iowrite16(TotalReset, ioaddr + EL3_CMD);
release_region(compaq_net_device->base_addr, release_region(compaq_net_device->base_addr,
VORTEX_TOTAL_SIZE); VORTEX_TOTAL_SIZE);
free_netdev (compaq_net_device); free_netdev(compaq_net_device);
} }
} }
static void __exit vortex_cleanup (void) static void __exit vortex_cleanup(void)
{ {
if (vortex_have_pci) if (vortex_have_pci)
pci_unregister_driver (&vortex_driver); pci_unregister_driver(&vortex_driver);
if (vortex_have_eisa) if (vortex_have_eisa)
vortex_eisa_cleanup (); vortex_eisa_cleanup();
} }
module_init(vortex_init); module_init(vortex_init);
module_exit(vortex_cleanup); module_exit(vortex_cleanup);
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/
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