]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SPARC/64] Rename some functions like PowerPC
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2007 07:43:56 +0000 (17:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 20 Jul 2007 04:24:53 +0000 (14:24 +1000)
This is to make the of merge easier.  Also rename of_bus_type.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/of_device.c
arch/sparc/kernel/time.c
arch/sparc64/kernel/auxio.c
arch/sparc64/kernel/of_device.c
arch/sparc64/kernel/power.c
arch/sparc64/kernel/time.c
include/asm-sparc/of_device.h
include/asm-sparc64/of_device.h

index 0760b8157847f86167b88ec8507966f3e6397a83..cb21983cff9fb7aa8b24fe1094e3af2c6190366d 100644 (file)
@@ -21,7 +21,7 @@ static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
        return of_match_device(matches, of_dev) != NULL;
 }
 
-static int of_device_probe(struct device *dev)
+static int of_platform_device_probe(struct device *dev)
 {
        int error = -ENODEV;
        struct of_platform_driver *drv;
@@ -45,7 +45,7 @@ static int of_device_probe(struct device *dev)
        return error;
 }
 
-static int of_device_remove(struct device *dev)
+static int of_platform_device_remove(struct device *dev)
 {
        struct of_device * of_dev = to_of_device(dev);
        struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
@@ -55,7 +55,7 @@ static int of_device_remove(struct device *dev)
        return 0;
 }
 
-static int of_device_suspend(struct device *dev, pm_message_t state)
+static int of_platform_device_suspend(struct device *dev, pm_message_t state)
 {
        struct of_device * of_dev = to_of_device(dev);
        struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
@@ -66,7 +66,7 @@ static int of_device_suspend(struct device *dev, pm_message_t state)
        return error;
 }
 
-static int of_device_resume(struct device * dev)
+static int of_platform_device_resume(struct device * dev)
 {
        struct of_device * of_dev = to_of_device(dev);
        struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
@@ -87,7 +87,7 @@ static int node_match(struct device *dev, void *data)
 
 struct of_device *of_find_device_by_node(struct device_node *dp)
 {
-       struct device *dev = bus_find_device(&of_bus_type, NULL,
+       struct device *dev = bus_find_device(&of_platform_bus_type, NULL,
                                             dp, node_match);
 
        if (dev)
@@ -101,10 +101,10 @@ EXPORT_SYMBOL(of_find_device_by_node);
 struct bus_type ebus_bus_type = {
        .name   = "ebus",
        .match  = of_platform_bus_match,
-       .probe  = of_device_probe,
-       .remove = of_device_remove,
-       .suspend        = of_device_suspend,
-       .resume = of_device_resume,
+       .probe  = of_platform_device_probe,
+       .remove = of_platform_device_remove,
+       .suspend        = of_platform_device_suspend,
+       .resume = of_platform_device_resume,
 };
 EXPORT_SYMBOL(ebus_bus_type);
 #endif
@@ -113,23 +113,23 @@ EXPORT_SYMBOL(ebus_bus_type);
 struct bus_type sbus_bus_type = {
        .name   = "sbus",
        .match  = of_platform_bus_match,
-       .probe  = of_device_probe,
-       .remove = of_device_remove,
-       .suspend        = of_device_suspend,
-       .resume = of_device_resume,
+       .probe  = of_platform_device_probe,
+       .remove = of_platform_device_remove,
+       .suspend        = of_platform_device_suspend,
+       .resume = of_platform_device_resume,
 };
 EXPORT_SYMBOL(sbus_bus_type);
 #endif
 
-struct bus_type of_bus_type = {
+struct bus_type of_platform_bus_type = {
        .name   = "of",
        .match  = of_platform_bus_match,
-       .probe  = of_device_probe,
-       .remove = of_device_remove,
-       .suspend        = of_device_suspend,
-       .resume = of_device_resume,
+       .probe  = of_platform_device_probe,
+       .remove = of_platform_device_remove,
+       .suspend        = of_platform_device_suspend,
+       .resume = of_platform_device_resume,
 };
-EXPORT_SYMBOL(of_bus_type);
+EXPORT_SYMBOL(of_platform_bus_type);
 
 static inline u64 of_read_addr(const u32 *cell, int size)
 {
@@ -595,7 +595,7 @@ build_resources:
        build_device_resources(op, parent);
 
        op->dev.parent = parent;
-       op->dev.bus = &of_bus_type;
+       op->dev.bus = &of_platform_bus_type;
        if (!parent)
                strcpy(op->dev.bus_id, "root");
        else
@@ -639,7 +639,7 @@ static int __init of_bus_driver_init(void)
 {
        int err;
 
-       err = bus_register(&of_bus_type);
+       err = bus_register(&of_platform_bus_type);
 #ifdef CONFIG_PCI
        if (!err)
                err = bus_register(&ebus_bus_type);
index 7b4612da74a6ff0f830beba61d8eea3142c2b515..f2fdbb3664d37e34d3aaf8a6c19f6733e3c47e1a 100644 (file)
@@ -354,7 +354,7 @@ static struct of_platform_driver clock_driver = {
 /* Probe for the mostek real time clock chip. */
 static int __init clock_init(void)
 {
-       return of_register_driver(&clock_driver, &of_bus_type);
+       return of_register_driver(&clock_driver, &of_platform_bus_type);
 }
 
 /* Must be after subsys_initcall() so that busses are probed.  Must
index 826118ee53d5f97f74e3985c4c078a2e63f77a5b..7b379761e9f85fdf398444acc871ff70032aad0c 100644 (file)
@@ -155,7 +155,7 @@ static struct of_platform_driver auxio_driver = {
 
 static int __init auxio_init(void)
 {
-       return of_register_driver(&auxio_driver, &of_bus_type);
+       return of_register_driver(&auxio_driver, &of_platform_bus_type);
 }
 
 /* Must be after subsys_initcall() so that busses are probed.  Must
index 68927bc3d3a9ca31b9a79a33414188e7fe29ecbc..485f8579899a81c35b81028bccaf7c58d766ac73 100644 (file)
@@ -21,7 +21,7 @@ static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
        return of_match_device(matches, of_dev) != NULL;
 }
 
-static int of_device_probe(struct device *dev)
+static int of_platform_device_probe(struct device *dev)
 {
        int error = -ENODEV;
        struct of_platform_driver *drv;
@@ -45,7 +45,7 @@ static int of_device_probe(struct device *dev)
        return error;
 }
 
-static int of_device_remove(struct device *dev)
+static int of_platform_device_remove(struct device *dev)
 {
        struct of_device * of_dev = to_of_device(dev);
        struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
@@ -55,7 +55,7 @@ static int of_device_remove(struct device *dev)
        return 0;
 }
 
-static int of_device_suspend(struct device *dev, pm_message_t state)
+static int of_platform_device_suspend(struct device *dev, pm_message_t state)
 {
        struct of_device * of_dev = to_of_device(dev);
        struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
@@ -66,7 +66,7 @@ static int of_device_suspend(struct device *dev, pm_message_t state)
        return error;
 }
 
-static int of_device_resume(struct device * dev)
+static int of_platform_device_resume(struct device * dev)
 {
        struct of_device * of_dev = to_of_device(dev);
        struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
@@ -112,7 +112,7 @@ static int node_match(struct device *dev, void *data)
 
 struct of_device *of_find_device_by_node(struct device_node *dp)
 {
-       struct device *dev = bus_find_device(&of_bus_type, NULL,
+       struct device *dev = bus_find_device(&of_platform_bus_type, NULL,
                                             dp, node_match);
 
        if (dev)
@@ -126,20 +126,20 @@ EXPORT_SYMBOL(of_find_device_by_node);
 struct bus_type isa_bus_type = {
        .name   = "isa",
        .match  = of_platform_bus_match,
-       .probe  = of_device_probe,
-       .remove = of_device_remove,
-       .suspend        = of_device_suspend,
-       .resume = of_device_resume,
+       .probe  = of_platform_device_probe,
+       .remove = of_platform_device_remove,
+       .suspend        = of_platform_device_suspend,
+       .resume = of_platform_device_resume,
 };
 EXPORT_SYMBOL(isa_bus_type);
 
 struct bus_type ebus_bus_type = {
        .name   = "ebus",
        .match  = of_platform_bus_match,
-       .probe  = of_device_probe,
-       .remove = of_device_remove,
-       .suspend        = of_device_suspend,
-       .resume = of_device_resume,
+       .probe  = of_platform_device_probe,
+       .remove = of_platform_device_remove,
+       .suspend        = of_platform_device_suspend,
+       .resume = of_platform_device_resume,
 };
 EXPORT_SYMBOL(ebus_bus_type);
 #endif
@@ -148,23 +148,23 @@ EXPORT_SYMBOL(ebus_bus_type);
 struct bus_type sbus_bus_type = {
        .name   = "sbus",
        .match  = of_platform_bus_match,
-       .probe  = of_device_probe,
-       .remove = of_device_remove,
-       .suspend        = of_device_suspend,
-       .resume = of_device_resume,
+       .probe  = of_platform_device_probe,
+       .remove = of_platform_device_remove,
+       .suspend        = of_platform_device_suspend,
+       .resume = of_platform_device_resume,
 };
 EXPORT_SYMBOL(sbus_bus_type);
 #endif
 
-struct bus_type of_bus_type = {
+struct bus_type of_platform_bus_type = {
        .name   = "of",
        .match  = of_platform_bus_match,
-       .probe  = of_device_probe,
-       .remove = of_device_remove,
-       .suspend        = of_device_suspend,
-       .resume = of_device_resume,
+       .probe  = of_platform_device_probe,
+       .remove = of_platform_device_remove,
+       .suspend        = of_platform_device_suspend,
+       .resume = of_platform_device_resume,
 };
-EXPORT_SYMBOL(of_bus_type);
+EXPORT_SYMBOL(of_platform_bus_type);
 
 static inline u64 of_read_addr(const u32 *cell, int size)
 {
@@ -882,7 +882,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
                op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]);
 
        op->dev.parent = parent;
-       op->dev.bus = &of_bus_type;
+       op->dev.bus = &of_platform_bus_type;
        if (!parent)
                strcpy(op->dev.bus_id, "root");
        else
@@ -926,7 +926,7 @@ static int __init of_bus_driver_init(void)
 {
        int err;
 
-       err = bus_register(&of_bus_type);
+       err = bus_register(&of_platform_bus_type);
 #ifdef CONFIG_PCI
        if (!err)
                err = bus_register(&isa_bus_type);
index 8dd4294ad21ec0bcf0b3345d53f920efe999703c..fdc0d0b5a9107d0b057bc5ab597f10d137ad11c7 100644 (file)
@@ -170,6 +170,6 @@ static struct of_platform_driver power_driver = {
 
 void __init power_init(void)
 {
-       of_register_driver(&power_driver, &of_bus_type);
+       of_register_driver(&power_driver, &of_platform_bus_type);
        return;
 }
index 62e316ab1339a0ed1687728dd5db0f7c89f31ec2..592ffcd57605bf90aa7c3acb50f6d89fe9803f24 100644 (file)
@@ -835,7 +835,7 @@ static int __init clock_init(void)
                return 0;
        }
 
-       return of_register_driver(&clock_driver, &of_bus_type);
+       return of_register_driver(&clock_driver, &of_platform_bus_type);
 }
 
 /* Must be after subsys_initcall() so that busses are probed.  Must
index b625261c9ec72b2b94989748c2d0dba2dea5bcd9..fd8e9574313954d38cc628371d08ff777d26f98b 100644 (file)
@@ -9,7 +9,8 @@
 
 extern struct bus_type ebus_bus_type;
 extern struct bus_type sbus_bus_type;
-extern struct bus_type of_bus_type;
+extern struct bus_type of_platform_bus_type;
+#define of_bus_type    of_platform_bus_type    /* for compatibility */
 
 /*
  * The of_device is a kind of "base class" that is a superset of
index 68048cb20688fc826923b04109472fa3f5ce613c..daf36eb52292917fdce155636d24c5afc927c676 100644 (file)
@@ -10,7 +10,8 @@
 extern struct bus_type isa_bus_type;
 extern struct bus_type ebus_bus_type;
 extern struct bus_type sbus_bus_type;
-extern struct bus_type of_bus_type;
+extern struct bus_type of_platform_bus_type;
+#define of_bus_type    of_platform_bus_type    /* for compatibility */
 
 /*
  * The of_device is a kind of "base class" that is a superset of