summaryrefslogtreecommitdiff
path: root/drivers/clk/sunxi
diff options
context:
space:
mode:
authorEmilio López <emilio@elopez.com.ar>2013-12-23 07:32:33 +0400
committerEmilio López <emilio@elopez.com.ar>2013-12-29 00:08:00 +0400
commitedaf3fb580df7f6c510699664f51485030a29f17 (patch)
tree9172b45af0755f07555d888ef8a53370ccd92ac3 /drivers/clk/sunxi
parent40a5dcba4e79023f0b511dc0ca498bdf9eacb5db (diff)
downloadlinux-edaf3fb580df7f6c510699664f51485030a29f17.tar.xz
clk: sunxi: clean the magic number of mux parents
This was pointed out during the review of the factor patches. Let's indicate what does that magic 5 mean. Signed-off-by: Emilio López <emilio@elopez.com.ar> Acked-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/sunxi')
-rw-r--r--drivers/clk/sunxi/clk-sunxi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 1c1172d6bdbe..bae5e32c51bd 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -420,13 +420,14 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
{
struct clk *clk;
const char *clk_name = node->name;
- const char *parents[5];
+ const char *parents[SUNXI_MAX_PARENTS];
void *reg;
int i = 0;
reg = of_iomap(node, 0);
- while (i < 5 && (parents[i] = of_clk_get_parent_name(node, i)) != NULL)
+ while (i < SUNXI_MAX_PARENTS &&
+ (parents[i] = of_clk_get_parent_name(node, i)) != NULL)
i++;
clk = clk_register_mux(NULL, clk_name, parents, i,