aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/i4l/isdn_ppp.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-12-03 18:49:46 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-03 18:49:46 -0500
commit838361fe7828a3ad1aae8dee87620474931dac5e (patch)
treef13348e539f193b46c45365587df155abb56b582 /drivers/isdn/i4l/isdn_ppp.c
parent25dd7e6aedff054736f9edfd05bb585d810d8543 (diff)
isdn: Kill directly reference of netdev->priv
Simply use netdev_priv() to replace netdev->priv. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/i4l/isdn_ppp.c')
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index bf5821ef192a..a3551dd0324d 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -1040,7 +1040,7 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
1040 is = ippp_table[slot]; 1040 is = ippp_table[slot];
1041 1041
1042 if (lp->master) { // FIXME? 1042 if (lp->master) { // FIXME?
1043 mlp = (isdn_net_local *) lp->master->priv; 1043 mlp = ISDN_MASTER_PRIV(lp);
1044 slot = mlp->ppp_slot; 1044 slot = mlp->ppp_slot;
1045 if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { 1045 if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
1046 printk(KERN_ERR "isdn_ppp_push_higher: master->ppp_slot(%d)\n", 1046 printk(KERN_ERR "isdn_ppp_push_higher: master->ppp_slot(%d)\n",
@@ -1223,7 +1223,7 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
1223 struct ippp_struct *ipt,*ipts; 1223 struct ippp_struct *ipt,*ipts;
1224 int slot, retval = 0; 1224 int slot, retval = 0;
1225 1225
1226 mlp = (isdn_net_local *) (netdev->priv); 1226 mlp = (isdn_net_local *) netdev_priv(netdev);
1227 nd = mlp->netdev; /* get master lp */ 1227 nd = mlp->netdev; /* get master lp */
1228 1228
1229 slot = mlp->ppp_slot; 1229 slot = mlp->ppp_slot;
@@ -2013,7 +2013,7 @@ isdn_ppp_dev_ioctl_stats(int slot, struct ifreq *ifr, struct net_device *dev)
2013{ 2013{
2014 struct ppp_stats __user *res = ifr->ifr_data; 2014 struct ppp_stats __user *res = ifr->ifr_data;
2015 struct ppp_stats t; 2015 struct ppp_stats t;
2016 isdn_net_local *lp = (isdn_net_local *) dev->priv; 2016 isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
2017 2017
2018 if (!access_ok(VERIFY_WRITE, res, sizeof(struct ppp_stats))) 2018 if (!access_ok(VERIFY_WRITE, res, sizeof(struct ppp_stats)))
2019 return -EFAULT; 2019 return -EFAULT;
@@ -2052,7 +2052,7 @@ isdn_ppp_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
2052{ 2052{
2053 int error=0; 2053 int error=0;
2054 int len; 2054 int len;
2055 isdn_net_local *lp = (isdn_net_local *) dev->priv; 2055 isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev);
2056 2056
2057 2057
2058 if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP) 2058 if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP)
@@ -2119,7 +2119,7 @@ isdn_ppp_dial_slave(char *name)
2119 2119
2120 sdev = lp->slave; 2120 sdev = lp->slave;
2121 while (sdev) { 2121 while (sdev) {
2122 isdn_net_local *mlp = (isdn_net_local *) sdev->priv; 2122 isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev);
2123 if (!(mlp->flags & ISDN_NET_CONNECTED)) 2123 if (!(mlp->flags & ISDN_NET_CONNECTED))
2124 break; 2124 break;
2125 sdev = mlp->slave; 2125 sdev = mlp->slave;
@@ -2127,7 +2127,7 @@ isdn_ppp_dial_slave(char *name)
2127 if (!sdev) 2127 if (!sdev)
2128 return 2; 2128 return 2;
2129 2129
2130 isdn_net_dial_req((isdn_net_local *) sdev->priv); 2130 isdn_net_dial_req((isdn_net_local *) netdev_priv(sdev));
2131 return 0; 2131 return 0;
2132#else 2132#else
2133 return -1; 2133 return -1;
@@ -2150,10 +2150,10 @@ isdn_ppp_hangup_slave(char *name)
2150 2150
2151 sdev = lp->slave; 2151 sdev = lp->slave;
2152 while (sdev) { 2152 while (sdev) {
2153 isdn_net_local *mlp = (isdn_net_local *) sdev->priv; 2153 isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev);
2154 2154
2155 if (mlp->slave) { /* find last connected link in chain */ 2155 if (mlp->slave) { /* find last connected link in chain */
2156 isdn_net_local *nlp = (isdn_net_local *) mlp->slave->priv; 2156 isdn_net_local *nlp = ISDN_SLAVE_PRIV(mlp);
2157 2157
2158 if (!(nlp->flags & ISDN_NET_CONNECTED)) 2158 if (!(nlp->flags & ISDN_NET_CONNECTED))
2159 break; 2159 break;
@@ -2688,7 +2688,7 @@ static void isdn_ppp_receive_ccp(isdn_net_dev *net_dev, isdn_net_local *lp,
2688 isdn_ppp_frame_log("ccp-rcv", skb->data, skb->len, 32, is->unit,lp->ppp_slot); 2688 isdn_ppp_frame_log("ccp-rcv", skb->data, skb->len, 32, is->unit,lp->ppp_slot);
2689 2689
2690 if(lp->master) { 2690 if(lp->master) {
2691 int slot = ((isdn_net_local *) (lp->master->priv))->ppp_slot; 2691 int slot = ISDN_MASTER_PRIV(lp)->ppp_slot;
2692 if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { 2692 if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
2693 printk(KERN_ERR "%s: slot(%d) out of range\n", 2693 printk(KERN_ERR "%s: slot(%d) out of range\n",
2694 __func__, slot); 2694 __func__, slot);
@@ -2875,7 +2875,7 @@ static void isdn_ppp_send_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, struct
2875 isdn_ppp_frame_log("ccp-xmit", skb->data, skb->len, 32, is->unit,lp->ppp_slot); 2875 isdn_ppp_frame_log("ccp-xmit", skb->data, skb->len, 32, is->unit,lp->ppp_slot);
2876 2876
2877 if (lp->master) { 2877 if (lp->master) {
2878 slot = ((isdn_net_local *) (lp->master->priv))->ppp_slot; 2878 slot = ISDN_MASTER_PRIV(lp)->ppp_slot;
2879 if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { 2879 if (slot < 0 || slot >= ISDN_MAX_CHANNELS) {
2880 printk(KERN_ERR "%s: slot(%d) out of range\n", 2880 printk(KERN_ERR "%s: slot(%d) out of range\n",
2881 __func__, slot); 2881 __func__, slot);