aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri_sbus.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-11-13 02:38:14 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-13 02:38:14 -0500
commit4cf1653aa90c6320dc8032443b5e322820aa28b1 (patch)
tree7920008d3f953defdcda8c81d39da963290d93ad /drivers/net/myri_sbus.c
parent454d7c9b14e20fd1949e2686e9de4a2926e01476 (diff)
netdevice: safe convert to netdev_priv() #part-2
We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. This patch is a safe convert for netdev->priv to netdev_priv(netdev). Since all of the netdev->priv is only for read. But it is too big to be sent in one mail. I split it to 4 parts and make every part smaller than 100,000 bytes, which is max size allowed by vger. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/myri_sbus.c')
-rw-r--r--drivers/net/myri_sbus.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index a78d4b992616..6833f65f8aec 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -536,7 +536,7 @@ static void myri_rx(struct myri_eth *mp, struct net_device *dev)
536static irqreturn_t myri_interrupt(int irq, void *dev_id) 536static irqreturn_t myri_interrupt(int irq, void *dev_id)
537{ 537{
538 struct net_device *dev = (struct net_device *) dev_id; 538 struct net_device *dev = (struct net_device *) dev_id;
539 struct myri_eth *mp = (struct myri_eth *) dev->priv; 539 struct myri_eth *mp = netdev_priv(dev);
540 void __iomem *lregs = mp->lregs; 540 void __iomem *lregs = mp->lregs;
541 struct myri_channel __iomem *chan = &mp->shmem->channel; 541 struct myri_channel __iomem *chan = &mp->shmem->channel;
542 unsigned long flags; 542 unsigned long flags;
@@ -575,14 +575,14 @@ static irqreturn_t myri_interrupt(int irq, void *dev_id)
575 575
576static int myri_open(struct net_device *dev) 576static int myri_open(struct net_device *dev)
577{ 577{
578 struct myri_eth *mp = (struct myri_eth *) dev->priv; 578 struct myri_eth *mp = netdev_priv(dev);
579 579
580 return myri_init(mp, in_interrupt()); 580 return myri_init(mp, in_interrupt());
581} 581}
582 582
583static int myri_close(struct net_device *dev) 583static int myri_close(struct net_device *dev)
584{ 584{
585 struct myri_eth *mp = (struct myri_eth *) dev->priv; 585 struct myri_eth *mp = netdev_priv(dev);
586 586
587 myri_clean_rings(mp); 587 myri_clean_rings(mp);
588 return 0; 588 return 0;
@@ -590,7 +590,7 @@ static int myri_close(struct net_device *dev)
590 590
591static void myri_tx_timeout(struct net_device *dev) 591static void myri_tx_timeout(struct net_device *dev)
592{ 592{
593 struct myri_eth *mp = (struct myri_eth *) dev->priv; 593 struct myri_eth *mp = netdev_priv(dev);
594 594
595 printk(KERN_ERR "%s: transmit timed out, resetting\n", dev->name); 595 printk(KERN_ERR "%s: transmit timed out, resetting\n", dev->name);
596 596
@@ -601,7 +601,7 @@ static void myri_tx_timeout(struct net_device *dev)
601 601
602static int myri_start_xmit(struct sk_buff *skb, struct net_device *dev) 602static int myri_start_xmit(struct sk_buff *skb, struct net_device *dev)
603{ 603{
604 struct myri_eth *mp = (struct myri_eth *) dev->priv; 604 struct myri_eth *mp = netdev_priv(dev);
605 struct sendq __iomem *sq = mp->sq; 605 struct sendq __iomem *sq = mp->sq;
606 struct myri_txd __iomem *txd; 606 struct myri_txd __iomem *txd;
607 unsigned long flags; 607 unsigned long flags;