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>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user