Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[powerpc.git] / arch / sparc / kernel / ebus.c
index 75ac24d..7bb86b9 100644 (file)
@@ -25,7 +25,7 @@
 struct linux_ebus *ebus_chain = NULL;
 
 /* We are together with pcic.c under CONFIG_PCI. */
-extern unsigned int pcic_pin_to_irq(unsigned int, char *name);
+extern unsigned int pcic_pin_to_irq(unsigned int, const char *name);
 
 /*
  * IRQ Blacklist
@@ -69,7 +69,7 @@ static inline unsigned long ebus_alloc(size_t size)
 
 /*
  */
-int __init ebus_blacklist_irq(char *name)
+int __init ebus_blacklist_irq(const char *name)
 {
        struct ebus_device_irq *dp;
 
@@ -86,8 +86,8 @@ int __init ebus_blacklist_irq(char *name)
 void __init fill_ebus_child(struct device_node *dp,
                            struct linux_ebus_child *dev)
 {
-       int *regs;
-       int *irqs;
+       const int *regs;
+       const int *irqs;
        int i, len;
 
        dev->prom_node = dp;
@@ -146,9 +146,9 @@ void __init fill_ebus_child(struct device_node *dp,
 
 void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev)
 {
-       struct linux_prom_registers *regs;
+       const struct linux_prom_registers *regs;
        struct linux_ebus_child *child;
-       int *irqs;
+       const int *irqs;
        int i, n, len;
        unsigned long baseaddr;
 
@@ -237,12 +237,12 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
        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);
 
        if ((dp = dp->child) != NULL) {
                dev->children = (struct linux_ebus_child *)
@@ -269,7 +269,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
 
 void __init ebus_init(void)
 {
-       struct linux_prom_pci_registers *regs;
+       const struct linux_prom_pci_registers *regs;
        struct linux_pbm_info *pbm;
        struct linux_ebus_device *dev;
        struct linux_ebus *ebus;
@@ -332,12 +332,12 @@ void __init ebus_init(void)
                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);
 
 
                nd = dp->child;