From c87ba23399c5d728190141596cdaec9b4b56593c Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 12 Apr 2005 23:31:37 +0000 Subject: [PATCH] Automatically updated using perl -pi -0777 -e 's/_disable\s*\(\s*struct dev \*dev\s*\)\s*{\s*struct nic \*nic.*?$/_disable ( struct nic *nic ) {/ms' *.c perl -pi -0777 -e 's/_disable\s*\(\s*struct dev \*dev(\s*__unused)?\)\s*{/_disable ( struct nic *nic$1 ) {/ms' *.c --- src/drivers/net/3c509.c | 4 +--- src/drivers/net/3c515.c | 4 +--- src/drivers/net/3c595.c | 4 +--- src/drivers/net/3c90x.c | 3 +-- src/drivers/net/cs89x0.c | 4 +--- src/drivers/net/davicom.c | 4 +--- src/drivers/net/depca.c | 4 +--- src/drivers/net/dmfe.c | 3 +-- src/drivers/net/e1000.c | 3 +-- src/drivers/net/eepro.c | 3 +-- src/drivers/net/eepro100.c | 3 +-- src/drivers/net/epic100.c | 3 +-- src/drivers/net/forcedeth.c | 3 +-- src/drivers/net/mtd80x.c | 3 +-- src/drivers/net/natsemi.c | 4 +--- src/drivers/net/ns83820.c | 3 +-- src/drivers/net/ns8390.c | 4 +--- src/drivers/net/pcnet32.c | 3 +-- src/drivers/net/prism2.c | 3 +-- src/drivers/net/r8169.c | 3 +-- src/drivers/net/rtl8139.c | 4 +--- src/drivers/net/sis900.c | 4 +--- src/drivers/net/sk_g16.c | 4 +--- src/drivers/net/skel.c | 3 +-- src/drivers/net/smc9000.c | 3 +-- src/drivers/net/sundance.c | 3 +-- src/drivers/net/tg3.c | 3 +-- src/drivers/net/tlan.c | 3 +-- src/drivers/net/tulip.c | 4 +--- src/drivers/net/via-rhine.c | 4 +--- src/drivers/net/w89c840.c | 4 +--- 31 files changed, 31 insertions(+), 76 deletions(-) diff --git a/src/drivers/net/3c509.c b/src/drivers/net/3c509.c index 6375e8c7..df6a3138 100644 --- a/src/drivers/net/3c509.c +++ b/src/drivers/net/3c509.c @@ -379,9 +379,7 @@ static void __t509_disable(void) outb(0xc0, EP_ID_PORT); } -static void t509_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void t509_disable ( struct nic *nic ) { /* reset and disable merge */ t509_reset(nic); __t509_disable(); diff --git a/src/drivers/net/3c515.c b/src/drivers/net/3c515.c index 7c21b45e..3d60079d 100644 --- a/src/drivers/net/3c515.c +++ b/src/drivers/net/3c515.c @@ -592,9 +592,7 @@ static void t515_transmit(struct nic *nic, const char *d, /* Destination */ /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void t515_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *) dev; +static void t515_disable ( struct nic *nic ) { /* merge reset an disable */ t515_reset(nic); diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c index 9093e59d..9d530710 100644 --- a/src/drivers/net/3c595.c +++ b/src/drivers/net/3c595.c @@ -440,9 +440,7 @@ vxsetlink(void) GO_WINDOW(1); } -static void t595_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void t595_disable ( struct nic *nic ) { t595_reset(nic); outw(STOP_TRANSCEIVER, BASE + VX_COMMAND); diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c index 1b100889..f72a6993 100644 --- a/src/drivers/net/3c90x.c +++ b/src/drivers/net/3c90x.c @@ -663,8 +663,7 @@ a3c90x_poll(struct nic *nic, int retrieve) *** [Ken] ***/ static void -a3c90x_disable(struct dev *dev __unused) -{ +a3c90x_disable ( struct nic *nic __unused ) { /* reset and disable merge */ a3c90x_reset(); /* Disable the receiver and transmitter. */ diff --git a/src/drivers/net/cs89x0.c b/src/drivers/net/cs89x0.c index f418dc1b..bf8b659e 100644 --- a/src/drivers/net/cs89x0.c +++ b/src/drivers/net/cs89x0.c @@ -438,9 +438,7 @@ static int cs89x0_poll(struct nic *nic, int retrieve) return 1; } -static void cs89x0_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void cs89x0_disable ( struct nic *nic ) { cs89x0_reset(nic); } diff --git a/src/drivers/net/davicom.c b/src/drivers/net/davicom.c index 07f8dc76..b9ba9b8c 100644 --- a/src/drivers/net/davicom.c +++ b/src/drivers/net/davicom.c @@ -617,9 +617,7 @@ static int davicom_poll(struct nic *nic, int retrieve) /*********************************************************************/ /* eth_disable - Disable the interface */ /*********************************************************************/ -static void davicom_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void davicom_disable ( struct nic *nic ) { whereami("davicom_disable\n"); davicom_reset(nic); diff --git a/src/drivers/net/depca.c b/src/drivers/net/depca.c index ca456803..a4ea56cc 100644 --- a/src/drivers/net/depca.c +++ b/src/drivers/net/depca.c @@ -648,9 +648,7 @@ static void depca_transmit( /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void depca_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void depca_disable ( struct nic *nic ) { /* reset and disable merge */ depca_reset(nic); diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c index dacf1560..99046e6c 100644 --- a/src/drivers/net/dmfe.c +++ b/src/drivers/net/dmfe.c @@ -446,8 +446,7 @@ static void dmfe_transmit(struct nic *nic, /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void dmfe_disable(struct dev *dev __unused) -{ +static void dmfe_disable ( struct nic *nic __unused ) { /* Reset & stop DM910X board */ outl(DM910X_RESET, BASE + DCR0); udelay(5); diff --git a/src/drivers/net/e1000.c b/src/drivers/net/e1000.c index 8e4668ad..a5bae064 100644 --- a/src/drivers/net/e1000.c +++ b/src/drivers/net/e1000.c @@ -3509,8 +3509,7 @@ e1000_transmit (struct nic *nic, const char *d, /* Destination */ /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void e1000_disable (struct dev *dev __unused) -{ +static void e1000_disable ( struct nic *nic __unused ) { /* Clear the transmit ring */ E1000_WRITE_REG (&hw, TDH, 0); E1000_WRITE_REG (&hw, TDT, 0); diff --git a/src/drivers/net/eepro.c b/src/drivers/net/eepro.c index a191a163..42450b9d 100644 --- a/src/drivers/net/eepro.c +++ b/src/drivers/net/eepro.c @@ -456,8 +456,7 @@ static void eepro_transmit( /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void eepro_disable(struct dev *dev __unused) -{ +static void eepro_disable ( struct nic *nic __unused ) { eepro_sw2bank0(ioaddr); /* Switch to bank 0 */ /* Flush the Tx and disable Rx */ outb(STOP_RCV_CMD, ioaddr); diff --git a/src/drivers/net/eepro100.c b/src/drivers/net/eepro100.c index 8699d2e0..e4b88b44 100644 --- a/src/drivers/net/eepro100.c +++ b/src/drivers/net/eepro100.c @@ -566,8 +566,7 @@ static int eepro100_poll(struct nic *nic, int retrieve) * * returns: void. */ -static void eepro100_disable(struct dev *dev __unused) -{ +static void eepro100_disable ( struct nic *nic __unused ) { /* from eepro100_reset */ outl(0, ioaddr + SCBPort); /* from eepro100_disable */ diff --git a/src/drivers/net/epic100.c b/src/drivers/net/epic100.c index 7a379869..9bac4e81 100644 --- a/src/drivers/net/epic100.c +++ b/src/drivers/net/epic100.c @@ -415,8 +415,7 @@ epic100_poll(struct nic *nic, int retrieve) static void -epic100_disable(struct dev *dev __unused) -{ +epic100_disable ( struct nic *nic __unused ) { /* Soft reset the chip. */ outl(GC_SOFT_RESET, genctl); } diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c index 989e5cd2..2f76c34d 100644 --- a/src/drivers/net/forcedeth.c +++ b/src/drivers/net/forcedeth.c @@ -875,8 +875,7 @@ static void forcedeth_transmit(struct nic *nic, const char *d, /* Destination */ /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void forcedeth_disable(struct dev *dev __unused) -{ +static void forcedeth_disable ( struct nic *nic __unused ) { /* put the card in its initial state */ /* This function serves 3 purposes. * This disables DMA and interrupts so we don't receive diff --git a/src/drivers/net/mtd80x.c b/src/drivers/net/mtd80x.c index 3e385cf7..f42fc7d8 100644 --- a/src/drivers/net/mtd80x.c +++ b/src/drivers/net/mtd80x.c @@ -649,8 +649,7 @@ static void mtd_transmit( /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void mtd_disable(struct dev *dev) -{ +static void mtd_disable ( struct nic *nic ) { /* put the card in its initial state */ /* Disable Tx Rx*/ outl( mtdx.crvalue & (~TxEnable) & (~RxEnable), mtdx.ioaddr + TCRRCR); diff --git a/src/drivers/net/natsemi.c b/src/drivers/net/natsemi.c index 2873461d..1ac86669 100644 --- a/src/drivers/net/natsemi.c +++ b/src/drivers/net/natsemi.c @@ -728,9 +728,7 @@ natsemi_poll(struct nic *nic, int retrieve) */ static void -natsemi_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +natsemi_disable ( struct nic *nic ) { /* merge reset and disable */ natsemi_init(nic); diff --git a/src/drivers/net/ns83820.c b/src/drivers/net/ns83820.c index a81730b7..d6e1d4a7 100755 --- a/src/drivers/net/ns83820.c +++ b/src/drivers/net/ns83820.c @@ -756,8 +756,7 @@ static void ns83820_transmit(struct nic *nic, const char *d, /* Destination */ /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void ns83820_disable(struct dev *dev) -{ +static void ns83820_disable ( struct nic *nic ) { /* put the card in its initial state */ /* This function serves 3 purposes. * This disables DMA and interrupts so we don't receive diff --git a/src/drivers/net/ns8390.c b/src/drivers/net/ns8390.c index 1533a406..a661effd 100644 --- a/src/drivers/net/ns8390.c +++ b/src/drivers/net/ns8390.c @@ -583,9 +583,7 @@ static int ns8390_poll(struct nic *nic, int retrieve) /************************************************************************** NS8390_DISABLE - Turn off adapter **************************************************************************/ -static void ns8390_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void ns8390_disable ( struct nic *nic ) { /* reset and disable merge */ ns8390_reset(nic); } diff --git a/src/drivers/net/pcnet32.c b/src/drivers/net/pcnet32.c index 24425aab..79f68b07 100644 --- a/src/drivers/net/pcnet32.c +++ b/src/drivers/net/pcnet32.c @@ -634,8 +634,7 @@ static void pcnet32_transmit(struct nic *nic __unused, const char *d, /* Destina /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void pcnet32_disable(struct dev *dev __unused) -{ +static void pcnet32_disable ( struct nic *nic __unused ) { /* Stop the PCNET32 here -- it ocassionally polls memory if we don't */ lp->a.write_csr(ioaddr, 0, 0x0004); diff --git a/src/drivers/net/prism2.c b/src/drivers/net/prism2.c index da010811..972256ad 100644 --- a/src/drivers/net/prism2.c +++ b/src/drivers/net/prism2.c @@ -727,8 +727,7 @@ static void prism2_transmit( /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void prism2_disable(struct dev *dev __unused) -{ +static void prism2_disable ( struct nic *nic __unused ) { /* put the card in its initial state */ } diff --git a/src/drivers/net/r8169.c b/src/drivers/net/r8169.c index 0e245c32..c6cb7a40 100644 --- a/src/drivers/net/r8169.c +++ b/src/drivers/net/r8169.c @@ -683,8 +683,7 @@ static void r8169_reset(struct nic *nic) /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void r8169_disable(struct dev *dev __unused) -{ +static void r8169_disable ( struct nic *nic __unused ) { int i; /* Stop the chip's Tx and Rx DMA processes. */ RTL_W8(ChipCmd, 0x00); diff --git a/src/drivers/net/rtl8139.c b/src/drivers/net/rtl8139.c index fc87cccb..251bb131 100644 --- a/src/drivers/net/rtl8139.c +++ b/src/drivers/net/rtl8139.c @@ -511,9 +511,7 @@ static void rtl_irq(struct nic *nic, irq_action_t action) } } -static void rtl_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void rtl_disable ( struct nic *nic ) { /* merge reset and disable */ rtl_reset(nic); diff --git a/src/drivers/net/sis900.c b/src/drivers/net/sis900.c index e6afd161..b34891d5 100644 --- a/src/drivers/net/sis900.c +++ b/src/drivers/net/sis900.c @@ -1213,9 +1213,7 @@ sis900_poll(struct nic *nic, int retrieve) */ static void -sis900_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +sis900_disable ( struct nic *nic ) { /* merge reset and disable */ sis900_init(nic); diff --git a/src/drivers/net/sk_g16.c b/src/drivers/net/sk_g16.c index f65118d7..e0e8a8fc 100644 --- a/src/drivers/net/sk_g16.c +++ b/src/drivers/net/sk_g16.c @@ -728,9 +728,7 @@ const char *pack) /* Packet */ /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void SK_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void SK_disable ( struct nic *nic ) { /* put the card in its initial state */ SK_lance_init(nic, MODE_NORMAL); /* reset and disable merge */ diff --git a/src/drivers/net/skel.c b/src/drivers/net/skel.c index 781b65de..26188990 100644 --- a/src/drivers/net/skel.c +++ b/src/drivers/net/skel.c @@ -81,8 +81,7 @@ static void skel_transmit( /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void skel_disable(struct dev *dev) -{ +static void skel_disable ( struct nic *nic ) { /* put the card in its initial state */ /* This function serves 3 purposes. * This disables DMA and interrupts so we don't receive diff --git a/src/drivers/net/smc9000.c b/src/drivers/net/smc9000.c index 6a935e35..62505579 100644 --- a/src/drivers/net/smc9000.c +++ b/src/drivers/net/smc9000.c @@ -359,8 +359,7 @@ static int smc9000_poll(struct nic *nic, int retrieve) return 0; } -static void smc9000_disable(struct dev *dev __unused) -{ +static void smc9000_disable ( struct nic *nic __unused ) { if(!smc9000_base) return; diff --git a/src/drivers/net/sundance.c b/src/drivers/net/sundance.c index 4806509d..0c00fab3 100644 --- a/src/drivers/net/sundance.c +++ b/src/drivers/net/sundance.c @@ -555,8 +555,7 @@ static void sundance_transmit(struct nic *nic, const char *d, /* Destination */ /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void sundance_disable(struct dev *dev __unused) -{ +static void sundance_disable ( struct nic *nic __unused ) { /* put the card in its initial state */ /* This function serves 3 purposes. * This disables DMA and interrupts so we don't receive diff --git a/src/drivers/net/tg3.c b/src/drivers/net/tg3.c index 0644d7f8..0e4f3d62 100644 --- a/src/drivers/net/tg3.c +++ b/src/drivers/net/tg3.c @@ -3186,8 +3186,7 @@ static void tg3_transmit(struct nic *nic, const char *dst_addr, /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void tg3_disable(struct dev *dev __unused) -{ +static void tg3_disable ( struct nic *nic __unused ) { struct tg3 *tp = &tg3; /* put the card in its initial state */ /* This function serves 3 purposes. diff --git a/src/drivers/net/tlan.c b/src/drivers/net/tlan.c index e5373ecc..67f64dc1 100644 --- a/src/drivers/net/tlan.c +++ b/src/drivers/net/tlan.c @@ -718,8 +718,7 @@ static void tlan_transmit(struct nic *nic, const char *d, /* Destination */ /************************************************************************** DISABLE - Turn off ethernet interface ***************************************************************************/ -static void tlan_disable(struct dev *dev __unused) -{ +static void tlan_disable ( struct nic *nic __unused ) { /* put the card in its initial state */ /* This function serves 3 purposes. * This disables DMA and interrupts so we don't receive diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c index 85252229..1037f6b9 100644 --- a/src/drivers/net/tulip.c +++ b/src/drivers/net/tulip.c @@ -1180,9 +1180,7 @@ static int tulip_poll(struct nic *nic, int retrieve) /*********************************************************************/ /* eth_disable - Disable the interface */ /*********************************************************************/ -static void tulip_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void tulip_disable ( struct nic *nic ) { #ifdef TULIP_DEBUG_WHERE whereami("tulip_disable\n"); #endif diff --git a/src/drivers/net/via-rhine.c b/src/drivers/net/via-rhine.c index 97a09893..d759a20a 100644 --- a/src/drivers/net/via-rhine.c +++ b/src/drivers/net/via-rhine.c @@ -1162,9 +1162,7 @@ rhine_probe1 (struct nic *nic, struct pci_device *pci, int ioaddr, int chip_id, } static void -rhine_disable (struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +rhine_disable ( struct nic *nic ) { struct rhine_private *tp = (struct rhine_private *) nic->priv_data; int ioaddr = tp->ioaddr; diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c index ab5b0ac7..7a57fa4f 100644 --- a/src/drivers/net/w89c840.c +++ b/src/drivers/net/w89c840.c @@ -579,9 +579,7 @@ static void w89c840_transmit( /************************************************************************** w89c840_disable - Turn off ethernet interface ***************************************************************************/ -static void w89c840_disable(struct dev *dev) -{ - struct nic *nic = (struct nic *)dev; +static void w89c840_disable ( struct nic *nic ) { /* merge reset and disable */ w89c840_reset(nic);