Skip to content

Commit 81fe523

Browse files
robherringbebarino
authored andcommitted
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: 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>
1 parent 5b1a1c1 commit 81fe523

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/clk/ti/clkctrl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,16 +512,16 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
512512
struct clk_hw_omap *hw;
513513
struct clk *clk;
514514
struct omap_clkctrl_clk *clkctrl_clk = NULL;
515-
const __be32 *addrp;
516515
bool legacy_naming;
517516
const char *clkctrl_name;
518517
u32 addr;
519518
int ret;
520519
char *c;
521520
u16 soc_mask = 0;
521+
struct resource res;
522522

523-
addrp = of_get_address(node, 0, NULL, NULL);
524-
addr = (u32)of_translate_address(node, addrp);
523+
of_address_to_resource(node, 0, &res);
524+
addr = (u32)res.start;
525525

526526
#ifdef CONFIG_ARCH_OMAP4
527527
if (of_machine_is_compatible("ti,omap4"))

0 commit comments

Comments
 (0)