mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [PATCH] ARM: clps711x: Simplify clock initialization
Date: Sun, 22 May 2016 12:55:33 +0300	[thread overview]
Message-ID: <1463910933-22087-1-git-send-email-shc_work@mail.ru> (raw)

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/clock.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-clps711x/clock.c b/arch/arm/mach-clps711x/clock.c
index f3b4d85..6f447f7 100644
--- a/arch/arm/mach-clps711x/clock.c
+++ b/arch/arm/mach-clps711x/clock.c
@@ -42,11 +42,6 @@ static const char *tc_sel_clks[] = {
 	"timer_hf",
 };
 
-static __init void clps711x_clk_register(enum clps711x_clks id)
-{
-	clk_register_clkdev(clks[id].clk, clks[id].name, NULL);
-}
-
 static __init int clps711x_clk_init(void)
 {
 	unsigned int f_cpu, f_bus, f_uart, f_timer_hf, f_timer_lf, pll;
@@ -99,14 +94,8 @@ static __init int clps711x_clk_init(void)
 	clks[tc2].clk = clk_mux(clks[tc2].name, IOMEM(SYSCON1), 7, 1,
 				tc_sel_clks, ARRAY_SIZE(tc_sel_clks), 0);
 
-	clps711x_clk_register(dummy);
-	clps711x_clk_register(cpu);
-	clps711x_clk_register(bus);
-	clps711x_clk_register(uart);
-	clps711x_clk_register(timer_hf);
-	clps711x_clk_register(timer_lf);
-	clps711x_clk_register(tc1);
-	clps711x_clk_register(tc2);
+	for (tmp = 0; tmp < clk_max; tmp++)
+		clk_register_clkdev(clks[tmp].clk, clks[tmp].name, NULL);
 
 	return 0;
 }
-- 
2.4.9


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2016-05-22  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-22  9:55 Alexander Shiyan [this message]
2016-05-23  7:51 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463910933-22087-1-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox