diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-08-26 17:00:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-09-03 20:26:41 +0100 |
commit | f5ed9c35bd2af6d9d171290d3dc45004f4f79bcf (patch) | |
tree | 58bb6d3362bbdc981ad9dcc917247d8eaf6c2f2e /drivers/vfio | |
parent | 91b4171f4e7e2d49aee54259b50e703e09bcff20 (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/vfio')
0 files changed, 0 insertions, 0 deletions