Commit 4cf915df authored by Stephen Boyd's avatar Stephen Boyd Committed by Stephen Boyd

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: default avatarStephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent c742e365
...@@ -61,7 +61,6 @@ static int clk_pwm_probe(struct platform_device *pdev) ...@@ -61,7 +61,6 @@ static int clk_pwm_probe(struct platform_device *pdev)
struct pwm_device *pwm; struct pwm_device *pwm;
struct pwm_args pargs; struct pwm_args pargs;
const char *clk_name; const char *clk_name;
struct clk *clk;
int ret; int ret;
clk_pwm = devm_kzalloc(&pdev->dev, sizeof(*clk_pwm), GFP_KERNEL); clk_pwm = devm_kzalloc(&pdev->dev, sizeof(*clk_pwm), GFP_KERNEL);
...@@ -107,11 +106,11 @@ static int clk_pwm_probe(struct platform_device *pdev) ...@@ -107,11 +106,11 @@ static int clk_pwm_probe(struct platform_device *pdev)
clk_pwm->pwm = pwm; clk_pwm->pwm = pwm;
clk_pwm->hw.init = &init; clk_pwm->hw.init = &init;
clk = devm_clk_register(&pdev->dev, &clk_pwm->hw); ret = devm_clk_hw_register(&pdev->dev, &clk_pwm->hw);
if (IS_ERR(clk)) if (ret)
return PTR_ERR(clk); return ret;
return of_clk_add_provider(node, of_clk_src_simple_get, clk); return of_clk_add_hw_provider(node, of_clk_hw_simple_get, &clk_pwm->hw);
} }
static int clk_pwm_remove(struct platform_device *pdev) static int clk_pwm_remove(struct platform_device *pdev)
......
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