[PATCH] ARM: Layerscape: ls1046ardb: add missing machine protection

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

 



rdb_late_init() should only run on the appropriate machine. Check the
machine before continuing.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/boards/ls1046ardb/board.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/ls1046ardb/board.c b/arch/arm/boards/ls1046ardb/board.c
index ee70171ca3..9570344b92 100644
--- a/arch/arm/boards/ls1046ardb/board.c
+++ b/arch/arm/boards/ls1046ardb/board.c
@@ -125,6 +125,9 @@ static struct nxid *nxp_nxid_read(const char *filename, unsigned int offset)
 
 static int rdb_late_init(void)
 {
+	if (!of_machine_is_compatible("fsl,ls1046a-rdb"))
+		return 0;
+
 	nxp_nxid_read("/dev/eeprom", 256);
 
 	return 0;
-- 
2.39.5





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

  Powered by Linux