]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MIPS: Loongson2: Use clk API instead of direct dereferences
authorJulia Lawall <Julia.Lawall@lip6.fr>
Thu, 3 Jan 2013 09:34:20 +0000 (09:34 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 1 Feb 2013 09:00:23 +0000 (10:00 +0100)
commitc7afe25d9490c645e9cfd323f4b8b6b3c71dc2ec
tree9f0608c5f185b0d77fb9f7b505d13da338be0124
parentf8463d5036c58c3fa9a2e3e471f2e4c8c2f46b01
MIPS: Loongson2: Use clk API instead of direct dereferences

A struct clk value is intended to be an abstract pointer, so it should be
manipulated using the various API functions.

clk_put is additionally added on the failure paths.

The semantic match that finds the first problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,e1;
identifier i;
@@

*e = clk_get(...)
 ... when != e = e1
     when any
*e->i
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org
Cc: linux-mips@linux-mips.org,
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/4751/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/cpufreq/loongson2_cpufreq.c