aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lib8390.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-15 06:12:31 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-17 13:37:52 -0500
commitece49153b601d95bcebd45a6394e370972f0b0a0 (patch)
treed4471256b69ce4d71458dca460621990eec503be /drivers/net/lib8390.c
parent5f54cebb13cdb8dcd85036f8bee29f14db18b6e1 (diff)
drivers/net: Remove unnecessary casts of netdev_priv
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/lib8390.c')
-rw-r--r--drivers/net/lib8390.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/lib8390.c b/drivers/net/lib8390.c
index e7030ceb178b..da74db4a03d4 100644
--- a/drivers/net/lib8390.c
+++ b/drivers/net/lib8390.c
@@ -203,7 +203,7 @@ static void __NS8390_init(struct net_device *dev, int startp);
203static int __ei_open(struct net_device *dev) 203static int __ei_open(struct net_device *dev)
204{ 204{
205 unsigned long flags; 205 unsigned long flags;
206 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 206 struct ei_device *ei_local = netdev_priv(dev);
207 207
208 if (dev->watchdog_timeo <= 0) 208 if (dev->watchdog_timeo <= 0)
209 dev->watchdog_timeo = TX_TIMEOUT; 209 dev->watchdog_timeo = TX_TIMEOUT;
@@ -231,7 +231,7 @@ static int __ei_open(struct net_device *dev)
231 */ 231 */
232static int __ei_close(struct net_device *dev) 232static int __ei_close(struct net_device *dev)
233{ 233{
234 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 234 struct ei_device *ei_local = netdev_priv(dev);
235 unsigned long flags; 235 unsigned long flags;
236 236
237 /* 237 /*
@@ -256,7 +256,7 @@ static int __ei_close(struct net_device *dev)
256static void __ei_tx_timeout(struct net_device *dev) 256static void __ei_tx_timeout(struct net_device *dev)
257{ 257{
258 unsigned long e8390_base = dev->base_addr; 258 unsigned long e8390_base = dev->base_addr;
259 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 259 struct ei_device *ei_local = netdev_priv(dev);
260 int txsr, isr, tickssofar = jiffies - dev_trans_start(dev); 260 int txsr, isr, tickssofar = jiffies - dev_trans_start(dev);
261 unsigned long flags; 261 unsigned long flags;
262 262
@@ -303,7 +303,7 @@ static netdev_tx_t __ei_start_xmit(struct sk_buff *skb,
303 struct net_device *dev) 303 struct net_device *dev)
304{ 304{
305 unsigned long e8390_base = dev->base_addr; 305 unsigned long e8390_base = dev->base_addr;
306 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 306 struct ei_device *ei_local = netdev_priv(dev);
307 int send_length = skb->len, output_page; 307 int send_length = skb->len, output_page;
308 unsigned long flags; 308 unsigned long flags;
309 char buf[ETH_ZLEN]; 309 char buf[ETH_ZLEN];
@@ -592,7 +592,7 @@ static void ei_tx_err(struct net_device *dev)
592static void ei_tx_intr(struct net_device *dev) 592static void ei_tx_intr(struct net_device *dev)
593{ 593{
594 unsigned long e8390_base = dev->base_addr; 594 unsigned long e8390_base = dev->base_addr;
595 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 595 struct ei_device *ei_local = netdev_priv(dev);
596 int status = ei_inb(e8390_base + EN0_TSR); 596 int status = ei_inb(e8390_base + EN0_TSR);
597 597
598 ei_outb_p(ENISR_TX, e8390_base + EN0_ISR); /* Ack intr. */ 598 ei_outb_p(ENISR_TX, e8390_base + EN0_ISR); /* Ack intr. */
@@ -675,7 +675,7 @@ static void ei_tx_intr(struct net_device *dev)
675static void ei_receive(struct net_device *dev) 675static void ei_receive(struct net_device *dev)
676{ 676{
677 unsigned long e8390_base = dev->base_addr; 677 unsigned long e8390_base = dev->base_addr;
678 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 678 struct ei_device *ei_local = netdev_priv(dev);
679 unsigned char rxing_page, this_frame, next_frame; 679 unsigned char rxing_page, this_frame, next_frame;
680 unsigned short current_offset; 680 unsigned short current_offset;
681 int rx_pkt_count = 0; 681 int rx_pkt_count = 0;
@@ -879,7 +879,7 @@ static void ei_rx_overrun(struct net_device *dev)
879static struct net_device_stats *__ei_get_stats(struct net_device *dev) 879static struct net_device_stats *__ei_get_stats(struct net_device *dev)
880{ 880{
881 unsigned long ioaddr = dev->base_addr; 881 unsigned long ioaddr = dev->base_addr;
882 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 882 struct ei_device *ei_local = netdev_priv(dev);
883 unsigned long flags; 883 unsigned long flags;
884 884
885 /* If the card is stopped, just return the present stats. */ 885 /* If the card is stopped, just return the present stats. */
@@ -927,7 +927,7 @@ static void do_set_multicast_list(struct net_device *dev)
927{ 927{
928 unsigned long e8390_base = dev->base_addr; 928 unsigned long e8390_base = dev->base_addr;
929 int i; 929 int i;
930 struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev); 930 struct ei_device *ei_local = netdev_priv(dev);
931 931
932 if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) 932 if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI)))
933 { 933 {
@@ -981,7 +981,7 @@ static void do_set_multicast_list(struct net_device *dev)
981static void __ei_set_multicast_list(struct net_device *dev) 981static void __ei_set_multicast_list(struct net_device *dev)
982{ 982{
983 unsigned long flags; 983 unsigned long flags;
984 struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev); 984 struct ei_device *ei_local = netdev_priv(dev);
985 985
986 spin_lock_irqsave(&ei_local->page_lock, flags); 986 spin_lock_irqsave(&ei_local->page_lock, flags);
987 do_set_multicast_list(dev); 987 do_set_multicast_list(dev);
@@ -998,7 +998,7 @@ static void __ei_set_multicast_list(struct net_device *dev)
998 998
999static void ethdev_setup(struct net_device *dev) 999static void ethdev_setup(struct net_device *dev)
1000{ 1000{
1001 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 1001 struct ei_device *ei_local = netdev_priv(dev);
1002 if (ei_debug > 1) 1002 if (ei_debug > 1)
1003 printk(version); 1003 printk(version);
1004 1004
@@ -1036,7 +1036,7 @@ static struct net_device *____alloc_ei_netdev(int size)
1036static void __NS8390_init(struct net_device *dev, int startp) 1036static void __NS8390_init(struct net_device *dev, int startp)
1037{ 1037{
1038 unsigned long e8390_base = dev->base_addr; 1038 unsigned long e8390_base = dev->base_addr;
1039 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 1039 struct ei_device *ei_local = netdev_priv(dev);
1040 int i; 1040 int i;
1041 int endcfg = ei_local->word16 1041 int endcfg = ei_local->word16
1042 ? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0)) 1042 ? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0))
@@ -1099,7 +1099,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
1099 int start_page) 1099 int start_page)
1100{ 1100{
1101 unsigned long e8390_base = dev->base_addr; 1101 unsigned long e8390_base = dev->base_addr;
1102 struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev); 1102 struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev);
1103 1103
1104 ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD); 1104 ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);
1105 1105