]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/sunhme.c
Merge branch 'upstream-fixes' into upstream
[linux-2.6-omap-h63xx.git] / drivers / net / sunhme.c
index ec51f397e1ed526ab8c00c0c6db0fa6b1c7b8fec..c6f5bc3c042ffde958ba2841f1730d92ae325f82 100644 (file)
@@ -13,7 +13,6 @@
  *     argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -2195,7 +2194,7 @@ static int happy_meal_open(struct net_device *dev)
         */
        if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) {
                if (request_irq(dev->irq, &happy_meal_interrupt,
-                               SA_SHIRQ, dev->name, (void *)dev)) {
+                               IRQF_SHARED, dev->name, (void *)dev)) {
                        HMD(("EAGAIN\n"));
                        printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n",
                               dev->irq);
@@ -2523,7 +2522,7 @@ static struct ethtool_ops hme_ethtool_ops = {
 static int hme_version_printed;
 
 #ifdef CONFIG_SBUS
-void __init quattro_get_ranges(struct quattro *qp)
+void __devinit quattro_get_ranges(struct quattro *qp)
 {
        struct sbus_dev *sdev = qp->quattro_dev;
        int err;
@@ -2539,7 +2538,7 @@ void __init quattro_get_ranges(struct quattro *qp)
        qp->nranges = (err / sizeof(struct linux_prom_ranges));
 }
 
-static void __init quattro_apply_ranges(struct quattro *qp, struct happy_meal *hp)
+static void __devinit quattro_apply_ranges(struct quattro *qp, struct happy_meal *hp)
 {
        struct sbus_dev *sdev = hp->happy_dev;
        int rng;
@@ -2566,16 +2565,12 @@ static void __init quattro_apply_ranges(struct quattro *qp, struct happy_meal *h
  *
  * Return NULL on failure.
  */
-static struct quattro * __init quattro_sbus_find(struct sbus_dev *goal_sdev)
+static struct quattro * __devinit quattro_sbus_find(struct sbus_dev *goal_sdev)
 {
-       struct sbus_bus *sbus;
        struct sbus_dev *sdev;
        struct quattro *qp;
        int i;
 
-       if (qfe_sbus_list == NULL)
-               goto found;
-
        for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
                for (i = 0, sdev = qp->quattro_dev;
                     (sdev != NULL) && (i < 4);
@@ -2584,17 +2579,7 @@ static struct quattro * __init quattro_sbus_find(struct sbus_dev *goal_sdev)
                                return qp;
                }
        }
-       for_each_sbus(sbus) {
-               for_each_sbusdev(sdev, sbus) {
-                       if (sdev == goal_sdev)
-                               goto found;
-               }
-       }
 
-       /* Cannot find quattro parent, fail. */
-       return NULL;
-
-found:
        qp = kmalloc(sizeof(struct quattro), GFP_KERNEL);
        if (qp != NULL) {
                int i;
@@ -2623,7 +2608,7 @@ static void __init quattro_sbus_register_irqs(void)
 
                err = request_irq(sdev->irqs[0],
                                  quattro_sbus_interrupt,
-                                 SA_SHIRQ, "Quattro",
+                                 IRQF_SHARED, "Quattro",
                                  qp);
                if (err != 0) {
                        printk(KERN_ERR "Quattro: Fatal IRQ registery error %d.\n", err);
@@ -2632,7 +2617,7 @@ static void __init quattro_sbus_register_irqs(void)
        }
 }
 
-static void __devexit quattro_sbus_free_irqs(void)
+static void quattro_sbus_free_irqs(void)
 {
        struct quattro *qp;
 
@@ -2676,7 +2661,7 @@ static struct quattro * __init quattro_pci_find(struct pci_dev *pdev)
 #endif /* CONFIG_PCI */
 
 #ifdef CONFIG_SBUS
-static int __init happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe)
+static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe)
 {
        struct device_node *dp = sdev->ofdev.node;
        struct quattro *qp = NULL;
@@ -3270,12 +3255,7 @@ static void __devexit happy_meal_pci_remove(struct pci_dev *pdev)
 }
 
 static struct pci_device_id happymeal_pci_ids[] = {
-       {
-         .vendor       = PCI_VENDOR_ID_SUN,
-         .device       = PCI_DEVICE_ID_SUN_HAPPYMEAL,
-         .subvendor    = PCI_ANY_ID,
-         .subdevice    = PCI_ANY_ID,
-       },
+       { PCI_DEVICE(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_HAPPYMEAL) },
        { }                     /* Terminating entry */
 };
 
@@ -3290,7 +3270,7 @@ static struct pci_driver hme_pci_driver = {
 
 static int __init happy_meal_pci_init(void)
 {
-       return pci_module_init(&hme_pci_driver);
+       return pci_register_driver(&hme_pci_driver);
 }
 
 static void happy_meal_pci_exit(void)