Remove unneeded casts of (void *) pointers.

Signed-off-by: Domen Puncer <domen@coderock.org>

--- c/drivers/isdn/i4l/isdn_net.c	2004-10-19 13:52:56.000000000 +0200
+++ a/drivers/isdn/i4l/isdn_net.c	2004-12-03 14:40:13.000000000 +0100
@@ -370,7 +370,7 @@ isdn_net_autohup(void)
 				break;
 			}
 		}
-		p = (isdn_net_dev *) p->next;
+		p = p->next;
 	}
 	last_jiffies = jiffies;
 	isdn_timer_ctrl(ISDN_TIMER_NETHANGUP, anymore);
@@ -667,7 +667,7 @@ isdn_net_dial(void)
 					/*
 					 * Switch to next number or back to start if at end of list.
 					 */
-					if (!(lp->dial = (isdn_net_phone *) lp->dial->next)) {
+					if (!(lp->dial = lp->dial->next)) {
 						lp->dial = lp->phone[1];
 						lp->dialretry++;
 
@@ -813,7 +813,7 @@ isdn_net_dial(void)
 				printk(KERN_WARNING "isdn_net: Illegal dialstate %d for device %s\n",
 				       lp->dialstate, lp->name);
 		}
-		p = (isdn_net_dev *) p->next;
+		p = p->next;
 	}
 	isdn_timer_ctrl(ISDN_TIMER_NETDIAL, anymore);
 }
@@ -824,7 +824,7 @@ isdn_net_dial(void)
 void
 isdn_net_hangup(struct net_device *d)
 {
-	isdn_net_local *lp = (isdn_net_local *) d->priv;
+	isdn_net_local *lp = d->priv;
 	isdn_ctrl cmd;
 #ifdef CONFIG_ISDN_X25
 	struct concap_proto *cprot = lp->netdev->cprot;
@@ -833,7 +833,7 @@ isdn_net_hangup(struct net_device *d)
 
 	if (lp->flags & ISDN_NET_CONNECTED) {
 		if (lp->slave != NULL) {
-			isdn_net_local *slp = (isdn_net_local *)lp->slave->priv;
+			isdn_net_local *slp = lp->slave->priv;
 			if (slp->flags & ISDN_NET_CONNECTED) {
 				printk(KERN_INFO
 					"isdn_net: hang up slave %s before %s\n",
@@ -1054,10 +1054,10 @@ isdn_net_xmit(struct net_device *ndev, s
 {
 	isdn_net_dev *nd;
 	isdn_net_local *slp;
-	isdn_net_local *lp = (isdn_net_local *) ndev->priv;
+	isdn_net_local *lp = ndev->priv;
 	int retv = 0;
 
-	if (((isdn_net_local *) (ndev->priv))->master) {
+	if (lp->master) {
 		printk("isdn BUG at %s:%d!\n", __FILE__, __LINE__);
 		dev_kfree_skb(skb);
 		return 0;
@@ -1069,7 +1069,7 @@ isdn_net_xmit(struct net_device *ndev, s
 		return isdn_ppp_xmit(skb, ndev);
 	}
 #endif
-	nd = ((isdn_net_local *) ndev->priv)->netdev;
+	nd = lp->netdev;
 	lp = isdn_net_get_locked_lp(nd);
 	if (!lp) {
 		printk(KERN_WARNING "%s: all channels busy - requeuing!\n", ndev->name);
@@ -1098,7 +1098,7 @@ isdn_net_xmit(struct net_device *ndev, s
 				if (time_after(jiffies, lp->sqfull_stamp + lp->slavedelay)) {
 					slp = lp->slave->priv;
 					if (!(slp->flags & ISDN_NET_CONNECTED)) {
-						isdn_net_force_dial_lp((isdn_net_local *) lp->slave->priv);
+						isdn_net_force_dial_lp(lp->slave->priv);
 					}
 				}
 			}
@@ -1118,7 +1118,7 @@ isdn_net_xmit(struct net_device *ndev, s
 static void
 isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
 {
-	isdn_net_local *lp = (isdn_net_local *) dev->priv;
+	isdn_net_local *lp = dev->priv;
 	if (!skb)
 		return;
 	if (lp->p_encap == ISDN_NET_ENCAP_ETHER) {
@@ -1133,7 +1133,7 @@ isdn_net_adjust_hdr(struct sk_buff *skb,
 
 void isdn_net_tx_timeout(struct net_device * ndev)
 {
-	isdn_net_local *lp = (isdn_net_local *) ndev->priv;
+	isdn_net_local *lp = ndev->priv;
 
 	printk(KERN_WARNING "isdn_tx_timeout dev %s dialstate %d\n", ndev->name, lp->dialstate);
 	if (!lp->dialstate){
@@ -1167,7 +1167,7 @@ void isdn_net_tx_timeout(struct net_devi
 static int
 isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
-	isdn_net_local *lp = (isdn_net_local *) ndev->priv;
+	isdn_net_local *lp = ndev->priv;
 #ifdef CONFIG_ISDN_X25
 	struct concap_proto * cprot = lp -> netdev -> cprot;
 /* At this point hard_start_xmit() passes control to the encapsulation
@@ -1348,7 +1348,7 @@ isdn_net_close(struct net_device *dev)
 static struct net_device_stats *
 isdn_net_get_stats(struct net_device *dev)
 {
-	isdn_net_local *lp = (isdn_net_local *) dev->priv;
+	isdn_net_local *lp = dev->priv;
 	return &lp->stats;
 }
 
@@ -1427,7 +1427,7 @@ isdn_net_ciscohdlck_alloc_skb(isdn_net_l
 int
 isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
-	isdn_net_local *lp = (isdn_net_local *) dev->priv;
+	isdn_net_local *lp = dev->priv;
 	unsigned long len = 0;
 	unsigned long expires = 0;
 	int tmp = 0;
@@ -1767,7 +1767,7 @@ isdn_net_ciscohdlck_receive(isdn_net_loc
 static void
 isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
 {
-	isdn_net_local *lp = (isdn_net_local *) ndev->priv;
+	isdn_net_local *lp = ndev->priv;
 	isdn_net_local *olp = lp;	/* original 'lp' */
 #ifdef CONFIG_ISDN_X25
 	struct concap_proto *cprot = lp -> netdev -> cprot;
@@ -1781,7 +1781,7 @@ isdn_net_receive(struct net_device *ndev
 		 * handle master's statistics and hangup-timeout
 		 */
 		ndev = lp->master;
-		lp = (isdn_net_local *) ndev->priv;
+		lp = ndev->priv;
 		lp->stats.rx_packets++;
 		lp->stats.rx_bytes += skb->len;
 	}
@@ -2012,7 +2012,7 @@ static int
 isdn_net_init(struct net_device *ndev)
 {
 	ushort max_hlhdr_len = 0;
-	isdn_net_local *lp = (isdn_net_local *) ndev->priv;
+	isdn_net_local *lp = ndev->priv;
 	int drvidx, i;
 
 	ether_setup(ndev);
@@ -2076,7 +2076,7 @@ isdn_net_swapbind(int drvidx)
 					p->local->pre_channel = 0;
 					break;
 			}
-		p = (isdn_net_dev *) p->next;
+		p = p->next;
 	}
 }
 
@@ -2153,7 +2153,7 @@ isdn_net_find_icall(int di, int ch, int 
 			printk(KERN_INFO "isdn_net: Service-Indicator not 1 or 7, ignored\n");
 		return 0;
 	}
-	n = (isdn_net_phone *) 0;
+	n = NULL;
 	p = dev->netdev;
 	ematch = wret = swapped = 0;
 #ifdef ISDN_DEBUG_NET_ICALL
@@ -2243,7 +2243,7 @@ isdn_net_find_icall(int di, int ch, int 
 									swapped = 1;
 								} else {
 									/* ... else iterate next device */
-									p = (isdn_net_dev *) p->next;
+									p = p->next;
 									continue;
 								}
 							} else {
@@ -2265,7 +2265,7 @@ isdn_net_find_icall(int di, int ch, int 
 #ifdef ISDN_DEBUG_NET_ICALL
 								printk(KERN_DEBUG "n_fi: final check failed\n");
 #endif
-								p = (isdn_net_dev *) p->next;
+								p = p->next;
 								continue;
 							}
 						}
@@ -2285,7 +2285,7 @@ isdn_net_find_icall(int di, int ch, int 
 				while (n) {
 					if (!isdn_msncmp(nr, n->num))
 						break;
-					n = (isdn_net_phone *) n->next;
+					n = n->next;
 				}
 			}
 			if (n || (!(lp->flags & ISDN_NET_SECURE))) {
@@ -2317,23 +2317,23 @@ isdn_net_find_icall(int di, int ch, int 
 				 * it's master and parent slave is online. If not, reject the call.
 				 */
 				if (lp->master) {
-					isdn_net_local *mlp = (isdn_net_local *) lp->master->priv;
+					isdn_net_local *mlp = lp->master->priv;
 					printk(KERN_DEBUG "ICALLslv: %s\n", lp->name);
 					printk(KERN_DEBUG "master=%s\n", mlp->name);
 					if (mlp->flags & ISDN_NET_CONNECTED) {
 						printk(KERN_DEBUG "master online\n");
 						/* Master is online, find parent-slave (master if first slave) */
 						while (mlp->slave) {
-							if ((isdn_net_local *) mlp->slave->priv == lp)
+							if (mlp->slave->priv == lp)
 								break;
-							mlp = (isdn_net_local *) mlp->slave->priv;
+							mlp = mlp->slave->priv;
 						}
 					} else
 						printk(KERN_DEBUG "master offline\n");
 					/* Found parent, if it's offline iterate next device */
 					printk(KERN_DEBUG "mlpf: %d\n", mlp->flags & ISDN_NET_CONNECTED);
 					if (!(mlp->flags & ISDN_NET_CONNECTED)) {
-						p = (isdn_net_dev *) p->next;
+						p = p->next;
 						continue;
 					}
 				} 
@@ -2431,7 +2431,7 @@ isdn_net_find_icall(int di, int ch, int 
 				}
 			}
 		}
-		p = (isdn_net_dev *) p->next;
+		p = p->next;
 	}
 	/* If none of configured EAZ/MSN matched and not verbose, be silent */
 	if (!ematch || dev->net_verbose)
@@ -2450,9 +2450,9 @@ isdn_net_findif(char *name)
 	while (p) {
 		if (!strcmp(p->local->name, name))
 			return p;
-		p = (isdn_net_dev *) p->next;
+		p = p->next;
 	}
-	return (isdn_net_dev *) NULL;
+	return NULL;
 }
 
 /*
@@ -2543,12 +2543,12 @@ isdn_net_new(char *name, struct net_devi
 		printk(KERN_WARNING "isdn_net: interface %s already exists\n", name);
 		return NULL;
 	}
-	if (!(netdev = (isdn_net_dev *) kmalloc(sizeof(isdn_net_dev), GFP_KERNEL))) {
+	if (!(netdev = kmalloc(sizeof(isdn_net_dev), GFP_KERNEL))) {
 		printk(KERN_WARNING "isdn_net: Could not allocate net-device\n");
 		return NULL;
 	}
 	memset(netdev, 0, sizeof(isdn_net_dev));
-	if (!(netdev->local = (isdn_net_local *) kmalloc(sizeof(isdn_net_local), GFP_KERNEL))) {
+	if (!(netdev->local = kmalloc(sizeof(isdn_net_local), GFP_KERNEL))) {
 		printk(KERN_WARNING "isdn_net: Could not allocate device locals\n");
 		kfree(netdev);
 		return NULL;
@@ -2951,7 +2951,7 @@ isdn_net_addphone(isdn_net_ioctl_phone *
 	isdn_net_phone *n;
 
 	if (p) {
-		if (!(n = (isdn_net_phone *) kmalloc(sizeof(isdn_net_phone), GFP_KERNEL)))
+		if (!(n = kmalloc(sizeof(isdn_net_phone), GFP_KERNEL)))
 			return -ENOMEM;
 		strcpy(n->num, phone->phone);
 		n->next = p->local->phone[phone->outgoing & 1];
@@ -3049,7 +3049,7 @@ isdn_net_delphone(isdn_net_ioctl_phone *
 				return 0;
 			}
 			m = n;
-			n = (isdn_net_phone *) n->next;
+			n = n->next;
 		}
 		return -EINVAL;
 	}
@@ -3152,7 +3152,7 @@ isdn_net_realrm(isdn_net_dev * p, isdn_n
 				break;
 			}
 			q = n;
-			n = (isdn_net_dev *) n->next;
+			n = n->next;
 		}
 	}
 	spin_unlock_irqrestore(&dev->lock, flags);
@@ -3185,7 +3185,7 @@ isdn_net_rm(char *name)
 			return (isdn_net_realrm(p, q));
 		}
 		q = p;
-		p = (isdn_net_dev *) p->next;
+		p = p->next;
 	}
 	spin_unlock_irqrestore(&dev->lock, flags);
 	/* If no more net-devices remain, disable auto-hangup timer */
