diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-07-22 18:04:30 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-24 11:58:22 -0400 |
commit | cd4cd7306a403f62ef3ca783b9d1cf2a03e595ed (patch) | |
tree | 2eceb6990f5a0097f158c91316ee93fc2db5282d /arch/sparc/kernel/of_device_32.c | |
parent | a454dc50590c6d758abba016a303a221f2f1b4b8 (diff) |
sparc: remove references to of_device and to_of_device
of_device is just a #define alias to platform_device. This patch
replaces all references to it with platform_device.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/of_device_32.c')
-rw-r--r-- | arch/sparc/kernel/of_device_32.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c index 75fc9d5cd7e6..2d055a1e9cc2 100644 --- a/arch/sparc/kernel/of_device_32.c +++ b/arch/sparc/kernel/of_device_32.c | |||
@@ -241,10 +241,10 @@ static int __init use_1to1_mapping(struct device_node *pp) | |||
241 | 241 | ||
242 | static int of_resource_verbose; | 242 | static int of_resource_verbose; |
243 | 243 | ||
244 | static void __init build_device_resources(struct of_device *op, | 244 | static void __init build_device_resources(struct platform_device *op, |
245 | struct device *parent) | 245 | struct device *parent) |
246 | { | 246 | { |
247 | struct of_device *p_op; | 247 | struct platform_device *p_op; |
248 | struct of_bus *bus; | 248 | struct of_bus *bus; |
249 | int na, ns; | 249 | int na, ns; |
250 | int index, num_reg; | 250 | int index, num_reg; |
@@ -253,7 +253,7 @@ static void __init build_device_resources(struct of_device *op, | |||
253 | if (!parent) | 253 | if (!parent) |
254 | return; | 254 | return; |
255 | 255 | ||
256 | p_op = to_of_device(parent); | 256 | p_op = to_platform_device(parent); |
257 | bus = of_match_bus(p_op->dev.of_node); | 257 | bus = of_match_bus(p_op->dev.of_node); |
258 | bus->count_cells(op->dev.of_node, &na, &ns); | 258 | bus->count_cells(op->dev.of_node, &na, &ns); |
259 | 259 | ||
@@ -335,10 +335,10 @@ static void __init build_device_resources(struct of_device *op, | |||
335 | } | 335 | } |
336 | } | 336 | } |
337 | 337 | ||
338 | static struct of_device * __init scan_one_device(struct device_node *dp, | 338 | static struct platform_device * __init scan_one_device(struct device_node *dp, |
339 | struct device *parent) | 339 | struct device *parent) |
340 | { | 340 | { |
341 | struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); | 341 | struct platform_device *op = kzalloc(sizeof(*op), GFP_KERNEL); |
342 | const struct linux_prom_irqs *intr; | 342 | const struct linux_prom_irqs *intr; |
343 | struct dev_archdata *sd; | 343 | struct dev_archdata *sd; |
344 | int len, i; | 344 | int len, i; |
@@ -443,7 +443,7 @@ build_resources: | |||
443 | static void __init scan_tree(struct device_node *dp, struct device *parent) | 443 | static void __init scan_tree(struct device_node *dp, struct device *parent) |
444 | { | 444 | { |
445 | while (dp) { | 445 | while (dp) { |
446 | struct of_device *op = scan_one_device(dp, parent); | 446 | struct platform_device *op = scan_one_device(dp, parent); |
447 | 447 | ||
448 | if (op) | 448 | if (op) |
449 | scan_tree(dp->child, &op->dev); | 449 | scan_tree(dp->child, &op->dev); |
@@ -455,7 +455,7 @@ static void __init scan_tree(struct device_node *dp, struct device *parent) | |||
455 | static int __init scan_of_devices(void) | 455 | static int __init scan_of_devices(void) |
456 | { | 456 | { |
457 | struct device_node *root = of_find_node_by_path("/"); | 457 | struct device_node *root = of_find_node_by_path("/"); |
458 | struct of_device *parent; | 458 | struct platform_device *parent; |
459 | 459 | ||
460 | parent = scan_one_device(root, NULL); | 460 | parent = scan_one_device(root, NULL); |
461 | if (!parent) | 461 | if (!parent) |