diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2018-02-12 15:58:30 +0100 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2018-03-13 10:03:57 +0100 |
commit | 14bd7b9c8d3f4cc1f06563630b30adae7838f301 (patch) | |
tree | e2c5406c4ca1ed9f3162743576e6a3a597bd5b83 /drivers/clk/meson/gxbb.c | |
parent | 332b32a23225e01cdfac4fb6cb1c76553f906cb5 (diff) | |
download | linux-14bd7b9c8d3f4cc1f06563630b30adae7838f301.tar.bz2 |
clk: meson: only one loop index is necessary in probe
We don't need several loop index variables in the probe function
This is far from being critical but since we are doing a vast
rework of meson clock controllers, now is the time to lower the
entropy a bit
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Diffstat (limited to 'drivers/clk/meson/gxbb.c')
-rw-r--r-- | drivers/clk/meson/gxbb.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 17f44ac751b3..e6adab49c0ba 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -1947,7 +1947,7 @@ static int gxbb_clkc_probe(struct platform_device *pdev) { const struct clkc_data *clkc_data; void __iomem *clk_base; - int ret, clkid, i; + int ret, i; struct device *dev = &pdev->dev; clkc_data = of_device_get_match_data(dev); @@ -1988,16 +1988,15 @@ static int gxbb_clkc_probe(struct platform_device *pdev) for (i = 0; i < clkc_data->clk_audio_dividers_count; i++) clkc_data->clk_audio_dividers[i]->base = clk_base; - /* - * register all clks - */ - for (clkid = 0; clkid < clkc_data->hw_onecell_data->num; clkid++) { + + /* Register all clks */ + for (i = 0; i < clkc_data->hw_onecell_data->num; i++) { /* array might be sparse */ - if (!clkc_data->hw_onecell_data->hws[clkid]) + if (!clkc_data->hw_onecell_data->hws[i]) continue; ret = devm_clk_hw_register(dev, - clkc_data->hw_onecell_data->hws[clkid]); + clkc_data->hw_onecell_data->hws[i]); if (ret) goto iounmap; } |