[PATCH] i386: In compat mode, the return value here was uninitialized.
[powerpc.git] / arch / sparc64 / kernel / ebus.c
index a1023bb..0ace17b 100644 (file)
@@ -79,7 +79,7 @@ static void __ebus_dma_reset(struct ebus_dma_info *p, int no_drain)
        }
 }
 
-static irqreturn_t ebus_dma_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t ebus_dma_irq(int irq, void *dev_id)
 {
        struct ebus_dma_info *p = dev_id;
        unsigned long flags;
@@ -140,7 +140,7 @@ int ebus_dma_irq_enable(struct ebus_dma_info *p, int on)
 
        if (on) {
                if (p->flags & EBUS_DMA_FLAG_USE_EBDMA_HANDLER) {
-                       if (request_irq(p->irq, ebus_dma_irq, SA_SHIRQ, p->name, p))
+                       if (request_irq(p->irq, ebus_dma_irq, IRQF_SHARED, p->name, p))
                                return -EBUSY;
                }
 
@@ -285,7 +285,7 @@ static void __init fill_ebus_child(struct device_node *dp,
                                   int non_standard_regs)
 {
        struct of_device *op;
-       int *regs;
+       const int *regs;
        int i, len;
 
        dev->prom_node = dp;
@@ -389,12 +389,12 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de
        dev->ofdev.node = dp;
        dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
        dev->ofdev.dev.bus = &ebus_bus_type;
-       strcpy(dev->ofdev.dev.bus_id, dp->path_component_name);
+       sprintf(dev->ofdev.dev.bus_id, "ebus[%08x]", dp->node);
 
        /* Register with core */
        if (of_device_register(&dev->ofdev) != 0)
                printk(KERN_DEBUG "ebus: device registration error for %s!\n",
-                      dev->ofdev.dev.bus_id);
+                      dp->path_component_name);
 
        dp = dp->child;
        if (dp) {
@@ -438,11 +438,9 @@ static struct pci_dev *find_next_ebus(struct pci_dev *start, int *is_rio_p)
 
 void __init ebus_init(void)
 {
-       struct pci_pbm_info *pbm;
        struct linux_ebus_device *dev;
        struct linux_ebus *ebus;
        struct pci_dev *pdev;
-       struct pcidev_cookie *cookie;
        struct device_node *dp;
        int is_rio;
        int num_ebus = 0;
@@ -453,8 +451,7 @@ void __init ebus_init(void)
                return;
        }
 
-       cookie = pdev->sysdata;
-       dp = cookie->prom_node;
+       dp = pci_device_to_OF_node(pdev);
 
        ebus_chain = ebus = ebus_alloc(sizeof(struct linux_ebus));
        ebus->next = NULL;
@@ -480,8 +477,7 @@ void __init ebus_init(void)
                                break;
                        }
                        ebus->is_rio = is_rio;
-                       cookie = pdev->sysdata;
-                       dp = cookie->prom_node;
+                       dp = pci_device_to_OF_node(pdev);
                        continue;
                }
                printk("ebus%d:", num_ebus);
@@ -489,17 +485,16 @@ void __init ebus_init(void)
                ebus->index = num_ebus;
                ebus->prom_node = dp;
                ebus->self = pdev;
-               ebus->parent = pbm = cookie->pbm;
 
                ebus->ofdev.node = dp;
                ebus->ofdev.dev.parent = &pdev->dev;
                ebus->ofdev.dev.bus = &ebus_bus_type;
-               strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name);
+               sprintf(ebus->ofdev.dev.bus_id, "ebus%d", num_ebus);
 
                /* Register with core */
                if (of_device_register(&ebus->ofdev) != 0)
                        printk(KERN_DEBUG "ebus: device registration error for %s!\n",
-                              ebus->ofdev.dev.bus_id);
+                              dp->path_component_name);
 
 
                child = dp->child;
@@ -531,8 +526,7 @@ void __init ebus_init(void)
                if (!pdev)
                        break;
 
-               cookie = pdev->sysdata;
-               dp = cookie->prom_node;
+               dp = pci_device_to_OF_node(pdev);
 
                ebus->next = ebus_alloc(sizeof(struct linux_ebus));
                ebus = ebus->next;