mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 08:39:52 +00:00
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>
This commit is contained in:
parent
40a5dcba4e
commit
edaf3fb580
@ -420,13 +420,14 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
|
|||||||
{
|
{
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
const char *clk_name = node->name;
|
const char *clk_name = node->name;
|
||||||
const char *parents[5];
|
const char *parents[SUNXI_MAX_PARENTS];
|
||||||
void *reg;
|
void *reg;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
reg = of_iomap(node, 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++;
|
i++;
|
||||||
|
|
||||||
clk = clk_register_mux(NULL, clk_name, parents, i,
|
clk = clk_register_mux(NULL, clk_name, parents, i,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user