aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/address.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2014-05-07 16:23:56 -0400
committerRob Herring <robh@kernel.org>2014-05-13 15:11:09 -0400
commitd9c6866be8a145e32da616d8dcbae806032d75b5 (patch)
tree1ce6005ef541265b379480556db5d09f4d5802ae /drivers/of/address.c
parentb8acee3ef83f0fc50e57a3d4c91234982befda95 (diff)
of: kill off of_can_translate_address
of_can_translate_address only checks some conditions for address translation, but does not check other conditions like having range properties. The checks it does do are redundant with __of_address_translate. The only difference is printing a message or not. Since we only have a single caller that does the full translation anyway, just remove of_can_translate_address and quiet the error message. Cc: Grant Likely <grant.likely@linaro.org> Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Frank Rowand <frank.rowand@sonymobile.com> Reviewed-by: Frank Rowand <frank.rowand@sonymobile.com>
Diffstat (limited to 'drivers/of/address.c')
-rw-r--r--drivers/of/address.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/of/address.c b/drivers/of/address.c
index cb4242a69cd5..95351b2a112c 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -498,8 +498,7 @@ static u64 __of_translate_address(struct device_node *dev,
498 /* Count address cells & copy address locally */ 498 /* Count address cells & copy address locally */
499 bus->count_cells(dev, &na, &ns); 499 bus->count_cells(dev, &na, &ns);
500 if (!OF_CHECK_COUNTS(na, ns)) { 500 if (!OF_CHECK_COUNTS(na, ns)) {
501 printk(KERN_ERR "prom_parse: Bad cell count for %s\n", 501 pr_debug("OF: Bad cell count for %s\n", of_node_full_name(dev));
502 of_node_full_name(dev));
503 goto bail; 502 goto bail;
504 } 503 }
505 memcpy(addr, in_addr, na * 4); 504 memcpy(addr, in_addr, na * 4);
@@ -564,25 +563,6 @@ u64 of_translate_dma_address(struct device_node *dev, const __be32 *in_addr)
564} 563}
565EXPORT_SYMBOL(of_translate_dma_address); 564EXPORT_SYMBOL(of_translate_dma_address);
566 565
567bool of_can_translate_address(struct device_node *dev)
568{
569 struct device_node *parent;
570 struct of_bus *bus;
571 int na, ns;
572
573 parent = of_get_parent(dev);
574 if (parent == NULL)
575 return false;
576
577 bus = of_match_bus(parent);
578 bus->count_cells(dev, &na, &ns);
579
580 of_node_put(parent);
581
582 return OF_CHECK_COUNTS(na, ns);
583}
584EXPORT_SYMBOL(of_can_translate_address);
585
586const __be32 *of_get_address(struct device_node *dev, int index, u64 *size, 566const __be32 *of_get_address(struct device_node *dev, int index, u64 *size,
587 unsigned int *flags) 567 unsigned int *flags)
588{ 568{