diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-04-30 03:43:56 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-07-20 00:24:53 -0400 |
commit | 37b7754aab9a6ad7ecbba45c87f8d8a1f81b3bcc (patch) | |
tree | 8835a766b195fe2b25dce60ceff0f2713fe545fe /arch | |
parent | f898f8dbcec4848cddb8c5be2d0affd75779ebe2 (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')
-rw-r--r-- | arch/sparc/kernel/of_device.c | 42 | ||||
-rw-r--r-- | arch/sparc/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/auxio.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 50 | ||||
-rw-r--r-- | arch/sparc64/kernel/power.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/time.c | 2 |
6 files changed, 50 insertions, 50 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 | ||
24 | static int of_device_probe(struct device *dev) | 24 | static 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 | ||
48 | static int of_device_remove(struct device *dev) | 48 | static 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 | ||
58 | static int of_device_suspend(struct device *dev, pm_message_t state) | 58 | static 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 | ||
69 | static int of_device_resume(struct device * dev) | 69 | static 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 | ||
88 | struct of_device *of_find_device_by_node(struct device_node *dp) | 88 | struct 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); | |||
101 | struct bus_type ebus_bus_type = { | 101 | struct 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 | }; |
109 | EXPORT_SYMBOL(ebus_bus_type); | 109 | EXPORT_SYMBOL(ebus_bus_type); |
110 | #endif | 110 | #endif |
@@ -113,23 +113,23 @@ EXPORT_SYMBOL(ebus_bus_type); | |||
113 | struct bus_type sbus_bus_type = { | 113 | struct 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 | }; |
121 | EXPORT_SYMBOL(sbus_bus_type); | 121 | EXPORT_SYMBOL(sbus_bus_type); |
122 | #endif | 122 | #endif |
123 | 123 | ||
124 | struct bus_type of_bus_type = { | 124 | struct 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 | }; |
132 | EXPORT_SYMBOL(of_bus_type); | 132 | EXPORT_SYMBOL(of_platform_bus_type); |
133 | 133 | ||
134 | static inline u64 of_read_addr(const u32 *cell, int size) | 134 | static 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. */ |
355 | static int __init clock_init(void) | 355 | static 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 |
diff --git a/arch/sparc64/kernel/auxio.c b/arch/sparc64/kernel/auxio.c index 826118ee53d5..7b379761e9f8 100644 --- a/arch/sparc64/kernel/auxio.c +++ b/arch/sparc64/kernel/auxio.c | |||
@@ -155,7 +155,7 @@ static struct of_platform_driver auxio_driver = { | |||
155 | 155 | ||
156 | static int __init auxio_init(void) | 156 | static int __init auxio_init(void) |
157 | { | 157 | { |
158 | return of_register_driver(&auxio_driver, &of_bus_type); | 158 | return of_register_driver(&auxio_driver, &of_platform_bus_type); |
159 | } | 159 | } |
160 | 160 | ||
161 | /* Must be after subsys_initcall() so that busses are probed. Must | 161 | /* Must be after subsys_initcall() so that busses are probed. Must |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 68927bc3d3a9..485f8579899a 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/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 | ||
24 | static int of_device_probe(struct device *dev) | 24 | static 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 | ||
48 | static int of_device_remove(struct device *dev) | 48 | static 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 | ||
58 | static int of_device_suspend(struct device *dev, pm_message_t state) | 58 | static 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 | ||
69 | static int of_device_resume(struct device * dev) | 69 | static 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); |
@@ -112,7 +112,7 @@ static int node_match(struct device *dev, void *data) | |||
112 | 112 | ||
113 | struct of_device *of_find_device_by_node(struct device_node *dp) | 113 | struct of_device *of_find_device_by_node(struct device_node *dp) |
114 | { | 114 | { |
115 | struct device *dev = bus_find_device(&of_bus_type, NULL, | 115 | struct device *dev = bus_find_device(&of_platform_bus_type, NULL, |
116 | dp, node_match); | 116 | dp, node_match); |
117 | 117 | ||
118 | if (dev) | 118 | if (dev) |
@@ -126,20 +126,20 @@ EXPORT_SYMBOL(of_find_device_by_node); | |||
126 | struct bus_type isa_bus_type = { | 126 | struct bus_type isa_bus_type = { |
127 | .name = "isa", | 127 | .name = "isa", |
128 | .match = of_platform_bus_match, | 128 | .match = of_platform_bus_match, |
129 | .probe = of_device_probe, | 129 | .probe = of_platform_device_probe, |
130 | .remove = of_device_remove, | 130 | .remove = of_platform_device_remove, |
131 | .suspend = of_device_suspend, | 131 | .suspend = of_platform_device_suspend, |
132 | .resume = of_device_resume, | 132 | .resume = of_platform_device_resume, |
133 | }; | 133 | }; |
134 | EXPORT_SYMBOL(isa_bus_type); | 134 | EXPORT_SYMBOL(isa_bus_type); |
135 | 135 | ||
136 | struct bus_type ebus_bus_type = { | 136 | struct bus_type ebus_bus_type = { |
137 | .name = "ebus", | 137 | .name = "ebus", |
138 | .match = of_platform_bus_match, | 138 | .match = of_platform_bus_match, |
139 | .probe = of_device_probe, | 139 | .probe = of_platform_device_probe, |
140 | .remove = of_device_remove, | 140 | .remove = of_platform_device_remove, |
141 | .suspend = of_device_suspend, | 141 | .suspend = of_platform_device_suspend, |
142 | .resume = of_device_resume, | 142 | .resume = of_platform_device_resume, |
143 | }; | 143 | }; |
144 | EXPORT_SYMBOL(ebus_bus_type); | 144 | EXPORT_SYMBOL(ebus_bus_type); |
145 | #endif | 145 | #endif |
@@ -148,23 +148,23 @@ EXPORT_SYMBOL(ebus_bus_type); | |||
148 | struct bus_type sbus_bus_type = { | 148 | struct bus_type sbus_bus_type = { |
149 | .name = "sbus", | 149 | .name = "sbus", |
150 | .match = of_platform_bus_match, | 150 | .match = of_platform_bus_match, |
151 | .probe = of_device_probe, | 151 | .probe = of_platform_device_probe, |
152 | .remove = of_device_remove, | 152 | .remove = of_platform_device_remove, |
153 | .suspend = of_device_suspend, | 153 | .suspend = of_platform_device_suspend, |
154 | .resume = of_device_resume, | 154 | .resume = of_platform_device_resume, |
155 | }; | 155 | }; |
156 | EXPORT_SYMBOL(sbus_bus_type); | 156 | EXPORT_SYMBOL(sbus_bus_type); |
157 | #endif | 157 | #endif |
158 | 158 | ||
159 | struct bus_type of_bus_type = { | 159 | struct bus_type of_platform_bus_type = { |
160 | .name = "of", | 160 | .name = "of", |
161 | .match = of_platform_bus_match, | 161 | .match = of_platform_bus_match, |
162 | .probe = of_device_probe, | 162 | .probe = of_platform_device_probe, |
163 | .remove = of_device_remove, | 163 | .remove = of_platform_device_remove, |
164 | .suspend = of_device_suspend, | 164 | .suspend = of_platform_device_suspend, |
165 | .resume = of_device_resume, | 165 | .resume = of_platform_device_resume, |
166 | }; | 166 | }; |
167 | EXPORT_SYMBOL(of_bus_type); | 167 | EXPORT_SYMBOL(of_platform_bus_type); |
168 | 168 | ||
169 | static inline u64 of_read_addr(const u32 *cell, int size) | 169 | static inline u64 of_read_addr(const u32 *cell, int size) |
170 | { | 170 | { |
@@ -882,7 +882,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp, | |||
882 | op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]); | 882 | op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]); |
883 | 883 | ||
884 | op->dev.parent = parent; | 884 | op->dev.parent = parent; |
885 | op->dev.bus = &of_bus_type; | 885 | op->dev.bus = &of_platform_bus_type; |
886 | if (!parent) | 886 | if (!parent) |
887 | strcpy(op->dev.bus_id, "root"); | 887 | strcpy(op->dev.bus_id, "root"); |
888 | else | 888 | else |
@@ -926,7 +926,7 @@ static int __init of_bus_driver_init(void) | |||
926 | { | 926 | { |
927 | int err; | 927 | int err; |
928 | 928 | ||
929 | err = bus_register(&of_bus_type); | 929 | err = bus_register(&of_platform_bus_type); |
930 | #ifdef CONFIG_PCI | 930 | #ifdef CONFIG_PCI |
931 | if (!err) | 931 | if (!err) |
932 | err = bus_register(&isa_bus_type); | 932 | err = bus_register(&isa_bus_type); |
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c index 8dd4294ad21e..fdc0d0b5a910 100644 --- a/arch/sparc64/kernel/power.c +++ b/arch/sparc64/kernel/power.c | |||
@@ -170,6 +170,6 @@ static struct of_platform_driver power_driver = { | |||
170 | 170 | ||
171 | void __init power_init(void) | 171 | void __init power_init(void) |
172 | { | 172 | { |
173 | of_register_driver(&power_driver, &of_bus_type); | 173 | of_register_driver(&power_driver, &of_platform_bus_type); |
174 | return; | 174 | return; |
175 | } | 175 | } |
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 62e316ab1339..592ffcd57605 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -835,7 +835,7 @@ static int __init clock_init(void) | |||
835 | return 0; | 835 | return 0; |
836 | } | 836 | } |
837 | 837 | ||
838 | return of_register_driver(&clock_driver, &of_bus_type); | 838 | return of_register_driver(&clock_driver, &of_platform_bus_type); |
839 | } | 839 | } |
840 | 840 | ||
841 | /* Must be after subsys_initcall() so that busses are probed. Must | 841 | /* Must be after subsys_initcall() so that busses are probed. Must |