Commit 81fe523a authored by Rob Herring's avatar Rob Herring Committed by Stephen Boyd

clk: ti: 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: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230319163217.226144-1-robh@kernel.orgReviewed-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 5b1a1c1a
...@@ -512,16 +512,16 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) ...@@ -512,16 +512,16 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
struct clk_hw_omap *hw; struct clk_hw_omap *hw;
struct clk *clk; struct clk *clk;
struct omap_clkctrl_clk *clkctrl_clk = NULL; struct omap_clkctrl_clk *clkctrl_clk = NULL;
const __be32 *addrp;
bool legacy_naming; bool legacy_naming;
const char *clkctrl_name; const char *clkctrl_name;
u32 addr; u32 addr;
int ret; int ret;
char *c; char *c;
u16 soc_mask = 0; u16 soc_mask = 0;
struct resource res;
addrp = of_get_address(node, 0, NULL, NULL); of_address_to_resource(node, 0, &res);
addr = (u32)of_translate_address(node, addrp); addr = (u32)res.start;
#ifdef CONFIG_ARCH_OMAP4 #ifdef CONFIG_ARCH_OMAP4
if (of_machine_is_compatible("ti,omap4")) if (of_machine_is_compatible("ti,omap4"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment