omap: i2c: add a timeout to the busy waiting
[safe/jmp/linux-2.6] / drivers / net / ibmveth.c
index 5862282..cd508a8 100644 (file)
@@ -49,6 +49,7 @@
 #include <linux/proc_fs.h>
 #include <linux/in.h>
 #include <linux/ip.h>
+#include <linux/slab.h>
 #include <net/net_namespace.h>
 #include <asm/hvcall.h>
 #include <asm/atomic.h>
@@ -625,7 +626,7 @@ static int ibmveth_open(struct net_device *netdev)
        }
 
        ibmveth_debug_printk("registering irq 0x%x\n", netdev->irq);
-       if((rc = request_irq(netdev->irq, &ibmveth_interrupt, 0, netdev->name, netdev)) != 0) {
+       if((rc = request_irq(netdev->irq, ibmveth_interrupt, 0, netdev->name, netdev)) != 0) {
                ibmveth_error_printk("unable to request irq 0x%x, rc %d\n", netdev->irq, rc);
                do {
                        rc = h_free_logical_lan(adapter->vdev->unit_address);
@@ -1062,7 +1063,8 @@ static void ibmveth_set_multicast_list(struct net_device *netdev)
        struct ibmveth_adapter *adapter = netdev_priv(netdev);
        unsigned long lpar_rc;
 
-       if((netdev->flags & IFF_PROMISC) || (netdev->mc_count > adapter->mcastFilterSize)) {
+       if ((netdev->flags & IFF_PROMISC) ||
+           (netdev_mc_count(netdev) > adapter->mcastFilterSize)) {
                lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
                                           IbmVethMcastEnableRecv |
                                           IbmVethMcastDisableFiltering,
@@ -1071,8 +1073,7 @@ static void ibmveth_set_multicast_list(struct net_device *netdev)
                        ibmveth_error_printk("h_multicast_ctrl rc=%ld when entering promisc mode\n", lpar_rc);
                }
        } else {
-               struct dev_mc_list *mclist = netdev->mc_list;
-               int i;
+               struct dev_mc_list *mclist;
                /* clear the filter table & disable filtering */
                lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
                                           IbmVethMcastEnableRecv |
@@ -1083,7 +1084,7 @@ static void ibmveth_set_multicast_list(struct net_device *netdev)
                        ibmveth_error_printk("h_multicast_ctrl rc=%ld when attempting to clear filter table\n", lpar_rc);
                }
                /* add the addresses to the filter table */
-               for(i = 0; i < netdev->mc_count; ++i, mclist = mclist->next) {
+               netdev_for_each_mc_addr(mclist, netdev) {
                        // add the multicast address to the filter table
                        unsigned long mcast_addr = 0;
                        memcpy(((char *)&mcast_addr)+2, mclist->dmi_addr, 6);
@@ -1577,7 +1578,7 @@ static struct attribute * veth_pool_attrs[] = {
        NULL,
 };
 
-static struct sysfs_ops veth_pool_ops = {
+static const struct sysfs_ops veth_pool_ops = {
        .show   = veth_pool_show,
        .store  = veth_pool_store,
 };