diff mbox

[PATCH/RFC] ARM: arch-shmobile: only run FSI init on respective boards

Message ID w3pk4f9h4q3.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State Accepted
Headers show

Commit Message

Kuninori Morimoto April 5, 2011, 1:22 a.m. UTC
If several boards are enabled in the kernel configuration,
fsi_init_pm_clock() functions from board-ap4evb.c
will run on any of them. Prevent this by calling these functions from the
.init_machine() callback instead of using device_initcall().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Magnus Damm <damm@opensource.se>
---
This patch is depend on Guennadi's
[PATCH/RFC] ARM: arch-shmobile: only run HDMI init on respective boards

 arch/arm/mach-shmobile/board-ap4evb.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

Comments

Paul Mundt April 6, 2011, 6:22 p.m. UTC | #1
On Mon, Apr 04, 2011 at 05:08:05PM +0200, Guennadi Liakhovetski wrote:
> If several boards are enabled in the kernel configuration, 
> hdmi_init_pm_clock() functions from board-ap4evb.c and board-mackerel.c 
> will run on any of them. Prevent this by calling these functions from the 
> .init_machine() callback instead of using device_initcall().
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Magnus Damm <damm@opensource.se>

On Tue, Apr 05, 2011 at 10:22:33AM +0900, Kuninori Morimoto wrote:
> If several boards are enabled in the kernel configuration,
> fsi_init_pm_clock() functions from board-ap4evb.c
> will run on any of them. Prevent this by calling these functions from the
> .init_machine() callback instead of using device_initcall().
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Cc: Magnus Damm <damm@opensource.se>

Both applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 53c15e1..1e35fa9 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -996,7 +996,7 @@  out:
 		clk_put(hdmi_ick);
 }
 
-static int __init fsi_init_pm_clock(void)
+static void __init fsi_init_pm_clock(void)
 {
 	struct clk *fsia_ick;
 	int ret;
@@ -1005,7 +1005,7 @@  static int __init fsi_init_pm_clock(void)
 	if (IS_ERR(fsia_ick)) {
 		ret = PTR_ERR(fsia_ick);
 		pr_err("Cannot get FSI ICK: %d\n", ret);
-		return ret;
+		return;
 	}
 
 	ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk);
@@ -1013,10 +1013,7 @@  static int __init fsi_init_pm_clock(void)
 		pr_err("Cannot set FSI-A parent: %d\n", ret);
 
 	clk_put(fsia_ick);
-
-	return ret;
 }
-device_initcall(fsi_init_pm_clock);
 
 /*
  * FIXME !!
@@ -1345,6 +1342,7 @@  static void __init ap4evb_init(void)
 	platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));
 
 	hdmi_init_pm_clock();
+	fsi_init_pm_clock();
 }
 
 static void __init ap4evb_timer_init(void)