aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/scc.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-11-20 04:02:05 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 04:02:05 -0500
commitf4bdd264b43cc60dccb617afce2859dffdd7a935 (patch)
tree26cb9d386b1f1fa1a2902ee9943b71dee7423f9a /drivers/net/hamradio/scc.c
parentf3a216d1da1c034c425c4eafe27a1b45269985c7 (diff)
netdevice hamradio: Convert directly reference of netdev->priv
Since all the memory, which pointed by netdev->priv, are allocated in advance instead of by alloc_netdev(). Use netdev->ml_priv to point to those memory. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio/scc.c')
-rw-r--r--drivers/net/hamradio/scc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 802d1c7c4af1..c011af7088ea 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1518,7 +1518,7 @@ static int scc_net_alloc(const char *name, struct scc_channel *scc)
1518 if (!dev) 1518 if (!dev)
1519 return -ENOMEM; 1519 return -ENOMEM;
1520 1520
1521 dev->priv = scc; 1521 dev->ml_priv = scc;
1522 scc->dev = dev; 1522 scc->dev = dev;
1523 spin_lock_init(&scc->lock); 1523 spin_lock_init(&scc->lock);
1524 init_timer(&scc->tx_t); 1524 init_timer(&scc->tx_t);
@@ -1575,7 +1575,7 @@ static void scc_net_setup(struct net_device *dev)
1575 1575
1576static int scc_net_open(struct net_device *dev) 1576static int scc_net_open(struct net_device *dev)
1577{ 1577{
1578 struct scc_channel *scc = (struct scc_channel *) dev->priv; 1578 struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
1579 1579
1580 if (!scc->init) 1580 if (!scc->init)
1581 return -EINVAL; 1581 return -EINVAL;
@@ -1593,7 +1593,7 @@ static int scc_net_open(struct net_device *dev)
1593 1593
1594static int scc_net_close(struct net_device *dev) 1594static int scc_net_close(struct net_device *dev)
1595{ 1595{
1596 struct scc_channel *scc = (struct scc_channel *) dev->priv; 1596 struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
1597 unsigned long flags; 1597 unsigned long flags;
1598 1598
1599 netif_stop_queue(dev); 1599 netif_stop_queue(dev);
@@ -1634,7 +1634,7 @@ static void scc_net_rx(struct scc_channel *scc, struct sk_buff *skb)
1634 1634
1635static int scc_net_tx(struct sk_buff *skb, struct net_device *dev) 1635static int scc_net_tx(struct sk_buff *skb, struct net_device *dev)
1636{ 1636{
1637 struct scc_channel *scc = (struct scc_channel *) dev->priv; 1637 struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
1638 unsigned long flags; 1638 unsigned long flags;
1639 char kisscmd; 1639 char kisscmd;
1640 1640
@@ -1704,7 +1704,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1704 struct scc_mem_config memcfg; 1704 struct scc_mem_config memcfg;
1705 struct scc_hw_config hwcfg; 1705 struct scc_hw_config hwcfg;
1706 struct scc_calibrate cal; 1706 struct scc_calibrate cal;
1707 struct scc_channel *scc = (struct scc_channel *) dev->priv; 1707 struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
1708 int chan; 1708 int chan;
1709 unsigned char device_name[IFNAMSIZ]; 1709 unsigned char device_name[IFNAMSIZ];
1710 void __user *arg = ifr->ifr_data; 1710 void __user *arg = ifr->ifr_data;
@@ -1951,7 +1951,7 @@ static int scc_net_set_mac_address(struct net_device *dev, void *addr)
1951 1951
1952static struct net_device_stats *scc_net_get_stats(struct net_device *dev) 1952static struct net_device_stats *scc_net_get_stats(struct net_device *dev)
1953{ 1953{
1954 struct scc_channel *scc = (struct scc_channel *) dev->priv; 1954 struct scc_channel *scc = (struct scc_channel *) dev->ml_priv;
1955 1955
1956 scc->dev_stat.rx_errors = scc->stat.rxerrs + scc->stat.rx_over; 1956 scc->dev_stat.rx_errors = scc->stat.rxerrs + scc->stat.rx_over;
1957 scc->dev_stat.tx_errors = scc->stat.txerrs + scc->stat.tx_under; 1957 scc->dev_stat.tx_errors = scc->stat.txerrs + scc->stat.tx_under;