of: Always use 'struct device.of_node' to get device node pointer.
[safe/jmp/linux-2.6] / drivers / net / sunlance.c
index afc7b35..28afc86 100644 (file)
@@ -78,7 +78,6 @@ static char lancestr[] = "LANCE";
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/in.h>
-#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/delay.h>
 #include <linux/init.h>
@@ -94,6 +93,7 @@ static char lancestr[] = "LANCE";
 #include <linux/dma-mapping.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/gfp.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -923,7 +923,7 @@ static int lance_open(struct net_device *dev)
 
        STOP_LANCE(lp);
 
-       if (request_irq(dev->irq, &lance_interrupt, IRQF_SHARED,
+       if (request_irq(dev->irq, lance_interrupt, IRQF_SHARED,
                        lancestr, (void *) dev)) {
                printk(KERN_ERR "Lance: Can't get irq %d\n", dev->irq);
                return -EAGAIN;
@@ -1163,16 +1163,15 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
        dev->trans_start = jiffies;
        dev_kfree_skb(skb);
 
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 /* taken from the depca driver */
 static void lance_load_multicast(struct net_device *dev)
 {
        struct lance_private *lp = netdev_priv(dev);
-       struct dev_mc_list *dmi = dev->mc_list;
+       struct dev_mc_list *dmi;
        char *addrs;
-       int i;
        u32 crc;
        u32 val;
 
@@ -1196,9 +1195,8 @@ static void lance_load_multicast(struct net_device *dev)
                return;
 
        /* Add addresses */
-       for (i = 0; i < dev->mc_count; i++) {
+       netdev_for_each_mc_addr(dmi, dev) {
                addrs = dmi->dmi_addr;
-               dmi   = dmi->next;
 
                /* multicast address? */
                if (!(*addrs & 1))
@@ -1326,7 +1324,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op,
                                           struct of_device *ledma,
                                           struct of_device *lebuffer)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        static unsigned version_printed;
        struct lance_private *lp;
        struct net_device *dev;
@@ -1413,7 +1411,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op,
 
        lp->burst_sizes = 0;
        if (lp->ledma) {
-               struct device_node *ledma_dp = ledma->node;
+               struct device_node *ledma_dp = ledma->dev.of_node;
                struct device_node *sbus_dp;
                unsigned int sbmask;
                const char *prop;
@@ -1509,7 +1507,7 @@ fail:
 static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match)
 {
        struct of_device *parent = to_of_device(op->dev.parent);
-       struct device_node *parent_dp = parent->node;
+       struct device_node *parent_dp = parent->dev.of_node;
        int err;
 
        if (!strcmp(parent_dp->name, "ledma")) {