summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-03-04 13:22:57 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2017-04-24 21:41:08 +0200
commit7558c11378dd0ff1525a0cca5180804f6428af20 (patch)
tree78a2387d8192e64b9d9d6cfdc25cb3262257ad43
parent9a1da4df8502dd658db850650137d401b1fe123d (diff)
mmc: meson-gx: remove unneeded variable in meson_mmc_clk_init
Because the DT requires a fixed number of mux parent clocks, variable mux_parent_count can be replaced with constant MUX_CLK_NUM_PARENTS, so remove it. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Acked-by: Kevin Hilman <khilman@baylibre.com> Tested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/meson-gx-mmc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index b9de3d4714bb..ea2db3cea4ad 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -242,7 +242,6 @@ static int meson_mmc_clk_init(struct meson_host *host)
char clk_name[32];
int i, ret = 0;
const char *mux_parent_names[MUX_CLK_NUM_PARENTS];
- unsigned int mux_parent_count = 0;
const char *clk_div_parents[1];
u32 clk_reg, cfg;
@@ -261,7 +260,6 @@ static int meson_mmc_clk_init(struct meson_host *host)
}
mux_parent_names[i] = __clk_get_name(host->mux_parent[i]);
- mux_parent_count++;
}
/* create the mux */
@@ -270,7 +268,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
init.ops = &clk_mux_ops;
init.flags = 0;
init.parent_names = mux_parent_names;
- init.num_parents = mux_parent_count;
+ init.num_parents = MUX_CLK_NUM_PARENTS;
host->mux.reg = host->regs + SD_EMMC_CLOCK;
host->mux.shift = CLK_SRC_SHIFT;