Skip to content

Commit

Permalink
of: address: use resource_size helper
Browse files Browse the repository at this point in the history
that should be the approved way of calculating
the size of resources. No functional changes.

Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Felipe Balbi authored and Grant Likely committed Aug 1, 2011
1 parent 3da3f87 commit 28c1b6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/of/address.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,6 @@ void __iomem *of_iomap(struct device_node *np, int index)
if (of_address_to_resource(np, index, &res))
return NULL;

return ioremap(res.start, 1 + res.end - res.start);
return ioremap(res.start, resource_size(&res));
}
EXPORT_SYMBOL(of_iomap);

0 comments on commit 28c1b6d

Please sign in to comment.