]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/cosa.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / net / wan / cosa.c
index 5b82e4fd0d735a206d7a75bace529bd513ae4039..26058b4f8f36b2c5785a9291fd4baf8af10e017d 100644 (file)
@@ -90,7 +90,6 @@
 #include <linux/ioport.h>
 #include <linux/netdevice.h>
 #include <linux/spinlock.h>
-#include <linux/smp_lock.h>
 #include <linux/device.h>
 
 #undef COSA_SLOW_IO    /* for testing purposes only */
@@ -573,13 +572,11 @@ static int cosa_probe(int base, int irq, int dma)
        sprintf(cosa->name, "cosa%d", cosa->num);
 
        /* Initialize the per-channel data */
-       cosa->chan = kmalloc(sizeof(struct channel_data)*cosa->nchannels,
-                            GFP_KERNEL);
+       cosa->chan = kcalloc(cosa->nchannels, sizeof(struct channel_data), GFP_KERNEL);
        if (!cosa->chan) {
                err = -ENOMEM;
                goto err_out3;
        }
-       memset(cosa->chan, 0, sizeof(struct channel_data)*cosa->nchannels);
        for (i=0; i<cosa->nchannels; i++) {
                cosa->chan[i].cosa = cosa;
                cosa->chan[i].num = i;
@@ -773,7 +770,7 @@ static int sppp_rx_done(struct channel_data *chan)
        }
        chan->rx_skb->protocol = htons(ETH_P_WAN_PPP);
        chan->rx_skb->dev = chan->pppdev.dev;
-       chan->rx_skb->mac.raw = chan->rx_skb->data;
+       skb_reset_mac_header(chan->rx_skb);
        chan->stats.rx_packets++;
        chan->stats.rx_bytes += chan->cosa->rxsize;
        netif_rx(chan->rx_skb);