diff options
author | Joe Perches <joe@perches.com> | 2010-11-15 06:12:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-17 13:36:50 -0500 |
commit | a17531fa4c951f32ca4f90b04ca42cfb11924098 (patch) | |
tree | daf04e65a0713a726c1feba9e9065b323e455fc3 /drivers/isdn | |
parent | a1082bfe7d2d88d9626f5542dda9c0781394e91f (diff) |
drivers/isdn/i4l: 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/isdn')
-rw-r--r-- | drivers/isdn/i4l/isdn_concap.c | 2 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_net.c | 20 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_ppp.c | 12 |
3 files changed, 17 insertions, 17 deletions
diff --git a/drivers/isdn/i4l/isdn_concap.c b/drivers/isdn/i4l/isdn_concap.c index 46048e55f241..d568689669f8 100644 --- a/drivers/isdn/i4l/isdn_concap.c +++ b/drivers/isdn/i4l/isdn_concap.c | |||
@@ -61,7 +61,7 @@ static int isdn_concap_dl_data_req(struct concap_proto *concap, struct sk_buff * | |||
61 | static int isdn_concap_dl_connect_req(struct concap_proto *concap) | 61 | static int isdn_concap_dl_connect_req(struct concap_proto *concap) |
62 | { | 62 | { |
63 | struct net_device *ndev = concap -> net_dev; | 63 | struct net_device *ndev = concap -> net_dev; |
64 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); | 64 | isdn_net_local *lp = netdev_priv(ndev); |
65 | int ret; | 65 | int ret; |
66 | IX25DEBUG( "isdn_concap_dl_connect_req: %s \n", ndev -> name); | 66 | IX25DEBUG( "isdn_concap_dl_connect_req: %s \n", ndev -> name); |
67 | 67 | ||
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 26d44c3ca1d8..afeede7ee295 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -827,7 +827,7 @@ isdn_net_dial(void) | |||
827 | void | 827 | void |
828 | isdn_net_hangup(struct net_device *d) | 828 | isdn_net_hangup(struct net_device *d) |
829 | { | 829 | { |
830 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(d); | 830 | isdn_net_local *lp = netdev_priv(d); |
831 | isdn_ctrl cmd; | 831 | isdn_ctrl cmd; |
832 | #ifdef CONFIG_ISDN_X25 | 832 | #ifdef CONFIG_ISDN_X25 |
833 | struct concap_proto *cprot = lp->netdev->cprot; | 833 | struct concap_proto *cprot = lp->netdev->cprot; |
@@ -1052,7 +1052,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb) | |||
1052 | { | 1052 | { |
1053 | isdn_net_dev *nd; | 1053 | isdn_net_dev *nd; |
1054 | isdn_net_local *slp; | 1054 | isdn_net_local *slp; |
1055 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); | 1055 | isdn_net_local *lp = netdev_priv(ndev); |
1056 | int retv = NETDEV_TX_OK; | 1056 | int retv = NETDEV_TX_OK; |
1057 | 1057 | ||
1058 | if (((isdn_net_local *) netdev_priv(ndev))->master) { | 1058 | if (((isdn_net_local *) netdev_priv(ndev))->master) { |
@@ -1116,7 +1116,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb) | |||
1116 | static void | 1116 | static void |
1117 | isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev) | 1117 | isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev) |
1118 | { | 1118 | { |
1119 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); | 1119 | isdn_net_local *lp = netdev_priv(dev); |
1120 | if (!skb) | 1120 | if (!skb) |
1121 | return; | 1121 | return; |
1122 | if (lp->p_encap == ISDN_NET_ENCAP_ETHER) { | 1122 | if (lp->p_encap == ISDN_NET_ENCAP_ETHER) { |
@@ -1131,7 +1131,7 @@ isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev) | |||
1131 | 1131 | ||
1132 | static void isdn_net_tx_timeout(struct net_device * ndev) | 1132 | static void isdn_net_tx_timeout(struct net_device * ndev) |
1133 | { | 1133 | { |
1134 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); | 1134 | isdn_net_local *lp = netdev_priv(ndev); |
1135 | 1135 | ||
1136 | printk(KERN_WARNING "isdn_tx_timeout dev %s dialstate %d\n", ndev->name, lp->dialstate); | 1136 | printk(KERN_WARNING "isdn_tx_timeout dev %s dialstate %d\n", ndev->name, lp->dialstate); |
1137 | if (!lp->dialstate){ | 1137 | if (!lp->dialstate){ |
@@ -1165,7 +1165,7 @@ static void isdn_net_tx_timeout(struct net_device * ndev) | |||
1165 | static netdev_tx_t | 1165 | static netdev_tx_t |
1166 | isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev) | 1166 | isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev) |
1167 | { | 1167 | { |
1168 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); | 1168 | isdn_net_local *lp = netdev_priv(ndev); |
1169 | #ifdef CONFIG_ISDN_X25 | 1169 | #ifdef CONFIG_ISDN_X25 |
1170 | struct concap_proto * cprot = lp -> netdev -> cprot; | 1170 | struct concap_proto * cprot = lp -> netdev -> cprot; |
1171 | /* At this point hard_start_xmit() passes control to the encapsulation | 1171 | /* At this point hard_start_xmit() passes control to the encapsulation |
@@ -1347,7 +1347,7 @@ isdn_net_close(struct net_device *dev) | |||
1347 | static struct net_device_stats * | 1347 | static struct net_device_stats * |
1348 | isdn_net_get_stats(struct net_device *dev) | 1348 | isdn_net_get_stats(struct net_device *dev) |
1349 | { | 1349 | { |
1350 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); | 1350 | isdn_net_local *lp = netdev_priv(dev); |
1351 | return &lp->stats; | 1351 | return &lp->stats; |
1352 | } | 1352 | } |
1353 | 1353 | ||
@@ -1426,7 +1426,7 @@ isdn_net_ciscohdlck_alloc_skb(isdn_net_local *lp, int len) | |||
1426 | static int | 1426 | static int |
1427 | isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | 1427 | isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) |
1428 | { | 1428 | { |
1429 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); | 1429 | isdn_net_local *lp = netdev_priv(dev); |
1430 | unsigned long len = 0; | 1430 | unsigned long len = 0; |
1431 | unsigned long expires = 0; | 1431 | unsigned long expires = 0; |
1432 | int tmp = 0; | 1432 | int tmp = 0; |
@@ -1493,7 +1493,7 @@ isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1493 | static int isdn_net_ioctl(struct net_device *dev, | 1493 | static int isdn_net_ioctl(struct net_device *dev, |
1494 | struct ifreq *ifr, int cmd) | 1494 | struct ifreq *ifr, int cmd) |
1495 | { | 1495 | { |
1496 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); | 1496 | isdn_net_local *lp = netdev_priv(dev); |
1497 | 1497 | ||
1498 | switch (lp->p_encap) { | 1498 | switch (lp->p_encap) { |
1499 | #ifdef CONFIG_ISDN_PPP | 1499 | #ifdef CONFIG_ISDN_PPP |
@@ -1786,7 +1786,7 @@ isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb) | |||
1786 | static void | 1786 | static void |
1787 | isdn_net_receive(struct net_device *ndev, struct sk_buff *skb) | 1787 | isdn_net_receive(struct net_device *ndev, struct sk_buff *skb) |
1788 | { | 1788 | { |
1789 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); | 1789 | isdn_net_local *lp = netdev_priv(ndev); |
1790 | isdn_net_local *olp = lp; /* original 'lp' */ | 1790 | isdn_net_local *olp = lp; /* original 'lp' */ |
1791 | #ifdef CONFIG_ISDN_X25 | 1791 | #ifdef CONFIG_ISDN_X25 |
1792 | struct concap_proto *cprot = lp -> netdev -> cprot; | 1792 | struct concap_proto *cprot = lp -> netdev -> cprot; |
@@ -1800,7 +1800,7 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb) | |||
1800 | * handle master's statistics and hangup-timeout | 1800 | * handle master's statistics and hangup-timeout |
1801 | */ | 1801 | */ |
1802 | ndev = lp->master; | 1802 | ndev = lp->master; |
1803 | lp = (isdn_net_local *) netdev_priv(ndev); | 1803 | lp = netdev_priv(ndev); |
1804 | lp->stats.rx_packets++; | 1804 | lp->stats.rx_packets++; |
1805 | lp->stats.rx_bytes += skb->len; | 1805 | lp->stats.rx_bytes += skb->len; |
1806 | } | 1806 | } |
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index fe824e0cbb25..97c5cc2997f5 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c | |||
@@ -1221,7 +1221,7 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
1221 | struct ippp_struct *ipt,*ipts; | 1221 | struct ippp_struct *ipt,*ipts; |
1222 | int slot, retval = NETDEV_TX_OK; | 1222 | int slot, retval = NETDEV_TX_OK; |
1223 | 1223 | ||
1224 | mlp = (isdn_net_local *) netdev_priv(netdev); | 1224 | mlp = netdev_priv(netdev); |
1225 | nd = mlp->netdev; /* get master lp */ | 1225 | nd = mlp->netdev; /* get master lp */ |
1226 | 1226 | ||
1227 | slot = mlp->ppp_slot; | 1227 | slot = mlp->ppp_slot; |
@@ -1985,7 +1985,7 @@ isdn_ppp_dev_ioctl_stats(int slot, struct ifreq *ifr, struct net_device *dev) | |||
1985 | { | 1985 | { |
1986 | struct ppp_stats __user *res = ifr->ifr_data; | 1986 | struct ppp_stats __user *res = ifr->ifr_data; |
1987 | struct ppp_stats t; | 1987 | struct ppp_stats t; |
1988 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); | 1988 | isdn_net_local *lp = netdev_priv(dev); |
1989 | 1989 | ||
1990 | if (!access_ok(VERIFY_WRITE, res, sizeof(struct ppp_stats))) | 1990 | if (!access_ok(VERIFY_WRITE, res, sizeof(struct ppp_stats))) |
1991 | return -EFAULT; | 1991 | return -EFAULT; |
@@ -2024,7 +2024,7 @@ isdn_ppp_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
2024 | { | 2024 | { |
2025 | int error=0; | 2025 | int error=0; |
2026 | int len; | 2026 | int len; |
2027 | isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); | 2027 | isdn_net_local *lp = netdev_priv(dev); |
2028 | 2028 | ||
2029 | 2029 | ||
2030 | if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP) | 2030 | if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP) |
@@ -2091,7 +2091,7 @@ isdn_ppp_dial_slave(char *name) | |||
2091 | 2091 | ||
2092 | sdev = lp->slave; | 2092 | sdev = lp->slave; |
2093 | while (sdev) { | 2093 | while (sdev) { |
2094 | isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev); | 2094 | isdn_net_local *mlp = netdev_priv(sdev); |
2095 | if (!(mlp->flags & ISDN_NET_CONNECTED)) | 2095 | if (!(mlp->flags & ISDN_NET_CONNECTED)) |
2096 | break; | 2096 | break; |
2097 | sdev = mlp->slave; | 2097 | sdev = mlp->slave; |
@@ -2099,7 +2099,7 @@ isdn_ppp_dial_slave(char *name) | |||
2099 | if (!sdev) | 2099 | if (!sdev) |
2100 | return 2; | 2100 | return 2; |
2101 | 2101 | ||
2102 | isdn_net_dial_req((isdn_net_local *) netdev_priv(sdev)); | 2102 | isdn_net_dial_req(netdev_priv(sdev)); |
2103 | return 0; | 2103 | return 0; |
2104 | #else | 2104 | #else |
2105 | return -1; | 2105 | return -1; |
@@ -2122,7 +2122,7 @@ isdn_ppp_hangup_slave(char *name) | |||
2122 | 2122 | ||
2123 | sdev = lp->slave; | 2123 | sdev = lp->slave; |
2124 | while (sdev) { | 2124 | while (sdev) { |
2125 | isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev); | 2125 | isdn_net_local *mlp = netdev_priv(sdev); |
2126 | 2126 | ||
2127 | if (mlp->slave) { /* find last connected link in chain */ | 2127 | if (mlp->slave) { /* find last connected link in chain */ |
2128 | isdn_net_local *nlp = ISDN_SLAVE_PRIV(mlp); | 2128 | isdn_net_local *nlp = ISDN_SLAVE_PRIV(mlp); |