Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee13...
[pandora-kernel.git] / arch / ia64 / hp / sim / simeth.c
index ae84a10..e1a1b11 100644 (file)
@@ -4,7 +4,6 @@
  * Copyright (C) 1999-2001, 2003 Hewlett-Packard Co
  *     Stephane Eranian <eranian@hpl.hp.com>
  */
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/types.h>
@@ -191,7 +190,7 @@ simeth_probe1(void)
        unsigned char mac_addr[ETH_ALEN];
        struct simeth_local *local;
        struct net_device *dev;
-       int fd, i, err;
+       int fd, i, err, rc;
 
        /*
         * XXX Fix me
@@ -228,7 +227,9 @@ simeth_probe1(void)
                return err;
        }
 
-       dev->irq = assign_irq_vector(AUTO_ASSIGN);
+       if ((rc = assign_irq_vector(AUTO_ASSIGN)) < 0)
+               panic("%s: out of interrupt vectors!\n", __FUNCTION__);
+       dev->irq = rc;
 
        /*
         * attach the interrupt in the simulator, this does enable interrupts
@@ -319,7 +320,7 @@ simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
        }
 
        printk(KERN_INFO "simeth_device_event: %s ipaddr=0x%x\n",
-              dev->name, htonl(ifa->ifa_local));
+              dev->name, ntohl(ifa->ifa_local));
 
        /*
         * XXX Fix me
@@ -330,7 +331,7 @@ simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
        local = dev->priv;
        /* now do it for real */
        r = event == NETDEV_UP ?
-               netdev_attach(local->simfd, dev->irq, htonl(ifa->ifa_local)):
+               netdev_attach(local->simfd, dev->irq, ntohl(ifa->ifa_local)):
                netdev_detach(local->simfd);
 
        printk(KERN_INFO "simeth: netdev_attach/detach: event=%s ->%d\n",