aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-30 03:43:56 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2007-07-20 00:24:53 -0400
commit37b7754aab9a6ad7ecbba45c87f8d8a1f81b3bcc (patch)
tree8835a766b195fe2b25dce60ceff0f2713fe545fe /arch/sparc/kernel
parentf898f8dbcec4848cddb8c5be2d0affd75779ebe2 (diff)
[SPARC/64] Rename some functions like PowerPC
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>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/of_device.c42
-rw-r--r--arch/sparc/kernel/time.c2
2 files changed, 22 insertions, 22 deletions
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index 0760b8157847..cb21983cff9f 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -21,7 +21,7 @@ static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
21 return of_match_device(matches, of_dev) != NULL; 21 return of_match_device(matches, of_dev) != NULL;
22} 22}
23 23
24static int of_device_probe(struct device *dev) 24static int of_platform_device_probe(struct device *dev)
25{ 25{
26 int error = -ENODEV; 26 int error = -ENODEV;
27 struct of_platform_driver *drv; 27 struct of_platform_driver *drv;
@@ -45,7 +45,7 @@ static int of_device_probe(struct device *dev)
45 return error; 45 return error;
46} 46}
47 47
48static int of_device_remove(struct device *dev) 48static int of_platform_device_remove(struct device *dev)
49{ 49{
50 struct of_device * of_dev = to_of_device(dev); 50 struct of_device * of_dev = to_of_device(dev);
51 struct of_platform_driver * drv = to_of_platform_driver(dev->driver); 51 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
@@ -55,7 +55,7 @@ static int of_device_remove(struct device *dev)
55 return 0; 55 return 0;
56} 56}
57 57
58static int of_device_suspend(struct device *dev, pm_message_t state) 58static int of_platform_device_suspend(struct device *dev, pm_message_t state)
59{ 59{
60 struct of_device * of_dev = to_of_device(dev); 60 struct of_device * of_dev = to_of_device(dev);
61 struct of_platform_driver * drv = to_of_platform_driver(dev->driver); 61 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)
66 return error; 66 return error;
67} 67}
68 68
69static int of_device_resume(struct device * dev) 69static int of_platform_device_resume(struct device * dev)
70{ 70{
71 struct of_device * of_dev = to_of_device(dev); 71 struct of_device * of_dev = to_of_device(dev);
72 struct of_platform_driver * drv = to_of_platform_driver(dev->driver); 72 struct of_platform_driver * drv = to_of_platform_driver(dev->driver);
@@ -87,7 +87,7 @@ static int node_match(struct device *dev, void *data)
87 87
88struct of_device *of_find_device_by_node(struct device_node *dp) 88struct of_device *of_find_device_by_node(struct device_node *dp)
89{ 89{
90 struct device *dev = bus_find_device(&of_bus_type, NULL, 90 struct device *dev = bus_find_device(&of_platform_bus_type, NULL,
91 dp, node_match); 91 dp, node_match);
92 92
93 if (dev) 93 if (dev)
@@ -101,10 +101,10 @@ EXPORT_SYMBOL(of_find_device_by_node);
101struct bus_type ebus_bus_type = { 101struct bus_type ebus_bus_type = {
102 .name = "ebus", 102 .name = "ebus",
103 .match = of_platform_bus_match, 103 .match = of_platform_bus_match,
104 .probe = of_device_probe, 104 .probe = of_platform_device_probe,
105 .remove = of_device_remove, 105 .remove = of_platform_device_remove,
106 .suspend = of_device_suspend, 106 .suspend = of_platform_device_suspend,
107 .resume = of_device_resume, 107 .resume = of_platform_device_resume,
108}; 108};
109EXPORT_SYMBOL(ebus_bus_type); 109EXPORT_SYMBOL(ebus_bus_type);
110#endif 110#endif
@@ -113,23 +113,23 @@ EXPORT_SYMBOL(ebus_bus_type);
113struct bus_type sbus_bus_type = { 113struct bus_type sbus_bus_type = {
114 .name = "sbus", 114 .name = "sbus",
115 .match = of_platform_bus_match, 115 .match = of_platform_bus_match,
116 .probe = of_device_probe, 116 .probe = of_platform_device_probe,
117 .remove = of_device_remove, 117 .remove = of_platform_device_remove,
118 .suspend = of_device_suspend, 118 .suspend = of_platform_device_suspend,
119 .resume = of_device_resume, 119 .resume = of_platform_device_resume,
120}; 120};
121EXPORT_SYMBOL(sbus_bus_type); 121EXPORT_SYMBOL(sbus_bus_type);
122#endif 122#endif
123 123
124struct bus_type of_bus_type = { 124struct bus_type of_platform_bus_type = {
125 .name = "of", 125 .name = "of",
126 .match = of_platform_bus_match, 126 .match = of_platform_bus_match,
127 .probe = of_device_probe, 127 .probe = of_platform_device_probe,
128 .remove = of_device_remove, 128 .remove = of_platform_device_remove,
129 .suspend = of_device_suspend, 129 .suspend = of_platform_device_suspend,
130 .resume = of_device_resume, 130 .resume = of_platform_device_resume,
131}; 131};
132EXPORT_SYMBOL(of_bus_type); 132EXPORT_SYMBOL(of_platform_bus_type);
133 133
134static inline u64 of_read_addr(const u32 *cell, int size) 134static inline u64 of_read_addr(const u32 *cell, int size)
135{ 135{
@@ -595,7 +595,7 @@ build_resources:
595 build_device_resources(op, parent); 595 build_device_resources(op, parent);
596 596
597 op->dev.parent = parent; 597 op->dev.parent = parent;
598 op->dev.bus = &of_bus_type; 598 op->dev.bus = &of_platform_bus_type;
599 if (!parent) 599 if (!parent)
600 strcpy(op->dev.bus_id, "root"); 600 strcpy(op->dev.bus_id, "root");
601 else 601 else
@@ -639,7 +639,7 @@ static int __init of_bus_driver_init(void)
639{ 639{
640 int err; 640 int err;
641 641
642 err = bus_register(&of_bus_type); 642 err = bus_register(&of_platform_bus_type);
643#ifdef CONFIG_PCI 643#ifdef CONFIG_PCI
644 if (!err) 644 if (!err)
645 err = bus_register(&ebus_bus_type); 645 err = bus_register(&ebus_bus_type);
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index 7b4612da74a6..f2fdbb3664d3 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -354,7 +354,7 @@ static struct of_platform_driver clock_driver = {
354/* Probe for the mostek real time clock chip. */ 354/* Probe for the mostek real time clock chip. */
355static int __init clock_init(void) 355static int __init clock_init(void)
356{ 356{
357 return of_register_driver(&clock_driver, &of_bus_type); 357 return of_register_driver(&clock_driver, &of_platform_bus_type);
358} 358}
359 359
360/* Must be after subsys_initcall() so that busses are probed. Must 360/* Must be after subsys_initcall() so that busses are probed. Must