Skip to content

Commit

Permalink
clk: ti: Use of_address_to_resource()
Browse files Browse the repository at this point in the history
Replace of_get_address() and of_translate_address() calls with single
call to of_address_to_resource().

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230319163217.226144-1-robh@kernel.org
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Rob Herring authored and Stephen Boyd committed Mar 27, 2023
1 parent 5b1a1c1 commit 81fe523
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/clk/ti/clkctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,16 +512,16 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
struct clk_hw_omap *hw;
struct clk *clk;
struct omap_clkctrl_clk *clkctrl_clk = NULL;
const __be32 *addrp;
bool legacy_naming;
const char *clkctrl_name;
u32 addr;
int ret;
char *c;
u16 soc_mask = 0;
struct resource res;

addrp = of_get_address(node, 0, NULL, NULL);
addr = (u32)of_translate_address(node, addrp);
of_address_to_resource(node, 0, &res);
addr = (u32)res.start;

#ifdef CONFIG_ARCH_OMAP4
if (of_machine_is_compatible("ti,omap4"))
Expand Down

0 comments on commit 81fe523

Please sign in to comment.