[PATCH 3/9] ARM: zynq: zed: guard board initcall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make sure the board initcall is only executed on a
compatible board.

Signed-off-by: Lucas Stach <dev@xxxxxxxxxx>
---
 arch/arm/boards/avnet-zedboard/board.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/avnet-zedboard/board.c b/arch/arm/boards/avnet-zedboard/board.c
index 15332189ca09..faa0bacf0ce1 100644
--- a/arch/arm/boards/avnet-zedboard/board.c
+++ b/arch/arm/boards/avnet-zedboard/board.c
@@ -12,6 +12,9 @@
 
 static int zedboard_console_init(void)
 {
+	if (!of_machine_is_compatible("avnet,zynq-zed"))
+		return 0;
+
 	barebox_set_hostname("zedboard");
 
 	return 0;
-- 
2.47.1





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux