Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: axi-clkgen: Migrate to clk_hw based OF and registration APIs

Now that we have clk_hw based provider APIs to register clks, we
can get rid of struct clk pointers while registering clks in
these drivers, allowing us to move closer to a clear split of
consumer and provider clk APIs.

Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Stephen Boyd and committed by
Stephen Boyd
e0d30bb9 78cf5555

+6 -6
+6 -6
drivers/clk/clk-axi-clkgen.c
··· 392 392 const char *parent_names[2]; 393 393 const char *clk_name; 394 394 struct resource *mem; 395 - struct clk *clk; 396 395 unsigned int i; 396 + int ret; 397 397 398 398 if (!pdev->dev.of_node) 399 399 return -ENODEV; ··· 433 433 axi_clkgen_mmcm_enable(axi_clkgen, false); 434 434 435 435 axi_clkgen->clk_hw.init = &init; 436 - clk = devm_clk_register(&pdev->dev, &axi_clkgen->clk_hw); 437 - if (IS_ERR(clk)) 438 - return PTR_ERR(clk); 436 + ret = devm_clk_hw_register(&pdev->dev, &axi_clkgen->clk_hw); 437 + if (ret) 438 + return ret; 439 439 440 - return of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, 441 - clk); 440 + return of_clk_add_hw_provider(pdev->dev.of_node, of_clk_hw_simple_get, 441 + &axi_clkgen->clk_hw); 442 442 } 443 443 444 444 static int axi_clkgen_remove(struct platform_device *pdev)