bcma: Use of_address_to_resource()
PATCH 1/1 bcma: Use of_address_to_resource()
Replace of_get_address() and of_translate_address() calls with single call to of_address_to_resource().
Signed-off-by Rob Herring <[email protected]>
--- drivers/bcma/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/bcma/main.c +5 -5
@@ -140,17 +140,17 @@ static struct device_node *bcma_of_find_child_device(struct device *parent, struct bcma_device *core) {struct device_node *node; -u64 size; -const __be32 *reg; +int ret;if (!parent->of_node)return NULL ;for_each_child_of_node (parent->of_node, node) { - reg =of_get_address (node,0 , &size,NULL ); -if (!reg) +struct resource res; + ret =of_address_to_resource (node,0 , &res); +if (ret)continue ; -if (of_translate_address (node, reg) == core->addr) +if (res.start == core->addr)return node; }return NULL ;
Signature · 1 line
2.39.2
Quoted 4 lines · Rob Herring
Replace
of_get_address()andof_translate_address()calls with single call toof_address_to_resource().Signed-off-by Rob Herring <[email protected]>
Patch applied to wireless-next.git, thanks.
767d011dc39d bcma: Use of_address_to_resource()
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches