diff options
author | Rob Herring <robh@kernel.org> | 2014-05-07 15:23:56 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2014-05-13 14:11:09 -0500 |
commit | d9c6866be8a145e32da616d8dcbae806032d75b5 (patch) | |
tree | 1ce6005ef541265b379480556db5d09f4d5802ae /drivers/of/platform.c | |
parent | b8acee3ef83f0fc50e57a3d4c91234982befda95 (diff) | |
download | blackbird-op-linux-d9c6866be8a145e32da616d8dcbae806032d75b5.tar.gz blackbird-op-linux-d9c6866be8a145e32da616d8dcbae806032d75b5.zip |
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/platform.c')
-rw-r--r-- | drivers/of/platform.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 0602eb5b1be2..d0009b3614af 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -140,9 +140,8 @@ struct platform_device *of_device_alloc(struct device_node *np, return NULL; /* count the io and irq resources */ - if (of_can_translate_address(np)) - while (of_address_to_resource(np, num_reg, &temp_res) == 0) - num_reg++; + while (of_address_to_resource(np, num_reg, &temp_res) == 0) + num_reg++; num_irq = of_irq_count(np); /* Populate the resource table */ |