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/sparc64/kernel/of_device.c | |
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/sparc64/kernel/of_device.c')
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 50 |
1 files changed, 25 insertions, 25 deletions
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); |