[PARISC]: Fix build after ipv4_is_*() changes.
[safe/jmp/linux-2.6] / drivers / net / slip.c
index 39c2152..251a3ce 100644 (file)
@@ -229,10 +229,10 @@ static int sl_realloc_bufs(struct slip *sl, int mtu)
        if (len < 576 * 2)
                len = 576 * 2;
 
-       xbuff = (unsigned char *) kmalloc (len + 4, GFP_ATOMIC);
-       rbuff = (unsigned char *) kmalloc (len + 4, GFP_ATOMIC);
+       xbuff = kmalloc(len + 4, GFP_ATOMIC);
+       rbuff = kmalloc(len + 4, GFP_ATOMIC);
 #ifdef SL_INCLUDE_CSLIP
-       cbuff = (unsigned char *) kmalloc (len + 4, GFP_ATOMIC);
+       cbuff = kmalloc(len + 4, GFP_ATOMIC);
 #endif
 
 
@@ -363,7 +363,7 @@ sl_bump(struct slip *sl)
        }
        skb->dev = sl->dev;
        memcpy(skb_put(skb,count), sl->rbuff, count);
-       skb->mac.raw=skb->data;
+       skb_reset_mac_header(skb);
        skb->protocol=htons(ETH_P_IP);
        netif_rx(skb);
        sl->dev->last_rx = jiffies;
@@ -639,8 +639,6 @@ static void sl_setup(struct net_device *dev)
        dev->addr_len           = 0;
        dev->tx_queue_len       = 10;
 
-       SET_MODULE_OWNER(dev);
-
        /* New-style flags. */
        dev->flags              = IFF_NOARP|IFF_POINTOPOINT|IFF_MULTICAST;
 }
@@ -957,7 +955,7 @@ slip_close(struct tty_struct *tty)
   *                    STANDARD SLIP ENCAPSULATION                      *
   ************************************************************************/
 
-int
+static int
 slip_esc(unsigned char *s, unsigned char *d, int len)
 {
        unsigned char *ptr = d;
@@ -1220,14 +1218,8 @@ static int slip_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
                return 0;
        /* VSV changes end */
 #endif
-
-       /* Allow stty to read, but not set, the serial port */
-       case TCGETS:
-       case TCGETA:
-               return n_tty_ioctl(tty, file, cmd, arg);
-
        default:
-               return -ENOIOCTLCMD;
+               return tty_mode_ioctl(tty, file, cmd, arg);
        }
 }
 
@@ -1343,15 +1335,12 @@ static int __init slip_init(void)
        printk(KERN_INFO "SLIP linefill/keepalive option.\n");
 #endif
 
-       slip_devs = kmalloc(sizeof(struct net_device *)*slip_maxdev, GFP_KERNEL);
+       slip_devs = kzalloc(sizeof(struct net_device *)*slip_maxdev, GFP_KERNEL);
        if (!slip_devs) {
                printk(KERN_ERR "SLIP: Can't allocate slip devices array!  Uaargh! (-> No SLIP available)\n");
                return -ENOMEM;
        }
 
-       /* Clear the pointer array, we allocate devices when we need them */
-       memset(slip_devs, 0, sizeof(struct net_device *)*slip_maxdev);
-
        /* Fill in our line protocol discipline, and register it */
        if ((status = tty_register_ldisc(N_SLIP, &sl_ldisc)) != 0)  {
                printk(KERN_ERR "SLIP: can't register line discipline (err = %d)\n", status);