Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[powerpc.git] / drivers / net / 3c523.c
index 1c97271..da1a22c 100644 (file)
@@ -902,14 +902,11 @@ static void *alloc_rfa(struct net_device *dev, void *ptr)
 static irqreturn_t
 elmc_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        unsigned short stat;
        struct priv *p;
 
-       if (dev == NULL) {
-               printk(KERN_ERR "elmc-interrupt: irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       } else if (!netif_running(dev)) {
+       if (!netif_running(dev)) {
                /* The 3c523 has this habit of generating interrupts during the
                   reset.  I'm not sure if the ni52 has this same problem, but it's
                   really annoying if we haven't finished initializing it.  I was
@@ -991,7 +988,6 @@ static void elmc_rcv_int(struct net_device *dev)
                                rbd->status = 0;
                                skb = (struct sk_buff *) dev_alloc_skb(totlen + 2);
                                if (skb != NULL) {
-                                       skb->dev = dev;
                                        skb_reserve(skb, 2);    /* 16 byte alignment */
                                        skb_put(skb,totlen);
                                        eth_copy_and_sum(skb, (char *) p->base+(unsigned long) rbd->buffer,totlen,0);
@@ -1149,7 +1145,7 @@ static int elmc_send_packet(struct sk_buff *skb, struct net_device *dev)
 
        if (len != skb->len)
                memset((char *) p->xmit_cbuffs[p->xmit_count], 0, ETH_ZLEN);
-       memcpy((char *) p->xmit_cbuffs[p->xmit_count], (char *) (skb->data), skb->len);
+       skb_copy_from_linear_data(skb, (char *) p->xmit_cbuffs[p->xmit_count], skb->len);
 
 #if (NUM_XMIT_BUFFS == 1)
 #ifdef NO_NOPCOMMANDS
@@ -1305,7 +1301,7 @@ int __init init_module(void)
        } else return 0;
 }
 
-void cleanup_module(void)
+void __exit cleanup_module(void)
 {
        int this_dev;
        for (this_dev=0; this_dev<MAX_3C523_CARDS; this_dev++) {