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

clk: pwm: 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: Janusz Uzycki <j.uzycki@elproma.com.pl>
Cc: Philipp Zabel <p.zabel@pengutronix.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
4cf915df c742e365

+4 -5
+4 -5
drivers/clk/clk-pwm.c
··· 61 61 struct pwm_device *pwm; 62 62 struct pwm_args pargs; 63 63 const char *clk_name; 64 - struct clk *clk; 65 64 int ret; 66 65 67 66 clk_pwm = devm_kzalloc(&pdev->dev, sizeof(*clk_pwm), GFP_KERNEL); ··· 106 107 107 108 clk_pwm->pwm = pwm; 108 109 clk_pwm->hw.init = &init; 109 - clk = devm_clk_register(&pdev->dev, &clk_pwm->hw); 110 - if (IS_ERR(clk)) 111 - return PTR_ERR(clk); 110 + ret = devm_clk_hw_register(&pdev->dev, &clk_pwm->hw); 111 + if (ret) 112 + return ret; 112 113 113 - return of_clk_add_provider(node, of_clk_src_simple_get, clk); 114 + return of_clk_add_hw_provider(node, of_clk_hw_simple_get, &clk_pwm->hw); 114 115 } 115 116 116 117 static int clk_pwm_remove(struct platform_device *pdev)