drivers/net: Use kzalloc
[safe/jmp/linux-2.6] / drivers / net / fs_enet / mac-fcc.c
index 22e5a84..714da96 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/ptrace.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
-#include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/delay.h>
@@ -34,6 +33,7 @@
 #include <linux/platform_device.h>
 #include <linux/phy.h>
 #include <linux/of_device.h>
+#include <linux/gfp.h>
 
 #include <asm/immap_cpm2.h>
 #include <asm/mpc8260.h>
@@ -218,7 +218,7 @@ static void set_multicast_finish(struct net_device *dev)
 
        /* if all multi or too many multicasts; just enable all */
        if ((dev->flags & IFF_ALLMULTI) != 0 ||
-           dev->mc_count > FCC_MAX_MULTICAST_ADDRS) {
+           netdev_mc_count(dev) > FCC_MAX_MULTICAST_ADDRS) {
 
                W32(ep, fen_gaddrh, 0xffffffff);
                W32(ep, fen_gaddrl, 0xffffffff);
@@ -231,12 +231,12 @@ static void set_multicast_finish(struct net_device *dev)
 
 static void set_multicast_list(struct net_device *dev)
 {
-       struct dev_mc_list *pmc;
+       struct netdev_hw_addr *ha;
 
        if ((dev->flags & IFF_PROMISC) == 0) {
                set_multicast_start(dev);
-               for (pmc = dev->mc_list; pmc != NULL; pmc = pmc->next)
-                       set_multicast_one(dev, pmc->dmi_addr);
+               netdev_for_each_mc_addr(ha, dev)
+                       set_multicast_one(dev, ha->addr);
                set_multicast_finish(dev);
        } else
                set_promiscuous_mode(dev);
@@ -476,8 +476,9 @@ static void clear_int_events(struct net_device *dev, u32 int_events)
 
 static void ev_error(struct net_device *dev, u32 int_events)
 {
-       printk(KERN_WARNING DRV_MODULE_NAME
-              ": %s FS_ENET ERROR(s) 0x%x\n", dev->name, int_events);
+       struct fs_enet_private *fep = netdev_priv(dev);
+
+       dev_warn(fep->dev, "FS_ENET ERROR(s) 0x%x\n", int_events);
 }
 
 static int get_regs(struct net_device *dev, void *p, int *sizep)