summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-08-26 17:00:00 +0100
committerJonathan Cameron <jic23@kernel.org>2012-09-03 20:26:41 +0100
commitf5ed9c35bd2af6d9d171290d3dc45004f4f79bcf (patch)
tree58bb6d3362bbdc981ad9dcc917247d8eaf6c2f2e /drivers/iio
parent91b4171f4e7e2d49aee54259b50e703e09bcff20 (diff)
drivers/staging/iio/adc/spear_adc.c: use clk_prepare_enable and clk_disable_unprepare
Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and clk_enable, and clk_disable and clk_unprepare. They make the code more concise, and ensure that clk_unprepare is called when clk_enable fails. A simplified version of the semantic patch that introduces calls to these functions is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ - clk_prepare(e); - clk_enable(e); + clk_prepare_enable(e); @@ expression e; @@ - clk_disable(e); - clk_unprepare(e); + clk_disable_unprepare(e); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
0 files changed, 0 insertions, 0 deletions