Get the driver ready for the migration to the common clock framework by
calling clk_prepare() and clk_unprepare(). The calls are added in the
probe and remove handlers as the clk_enable() and clk_disable() calls
are located in atomic context and there's no callback function in
non-atomic context that can be used to prepare/unprepare the clock.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
goto err1;
}
+ ret = clk_prepare(p->clk);
+ if (ret < 0) {
+ dev_err(&pdev->dev, "unable to prepare clock\n");
+ goto err1;
+ }
+
p->pdev = pdev;
pm_runtime_enable(&pdev->dev);
return 0;
pm_runtime_disable(&pdev->dev);
+ clk_unprepare(p->clk);
err1:
spi_master_put(master);
return ret;
ret = spi_bitbang_stop(&p->bitbang);
if (!ret) {
pm_runtime_disable(&pdev->dev);
+ clk_unprepare(p->clk);
spi_master_put(p->bitbang.master);
}
return ret;