[PATCH 1/2] arm: boards: vscom-baltos: Run environment_initcall only on correct board

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

 



Check for the correct hardware before reading the eeprom.

Signed-off-by: Teresa Remmet <t.remmet@xxxxxxxxx>
---
 arch/arm/boards/vscom-baltos/board.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/vscom-baltos/board.c b/arch/arm/boards/vscom-baltos/board.c
index 39f40a6061f8..c64864d43200 100644
--- a/arch/arm/boards/vscom-baltos/board.c
+++ b/arch/arm/boards/vscom-baltos/board.c
@@ -68,6 +68,9 @@ static int baltos_read_eeprom(void)
 	int rc;
 	unsigned char mac_addr[6];
 
+	if (!of_machine_is_compatible("vscom,onrisc"))
+		return 0;
+
 	rc = read_file_2("/dev/eeprom0",
 			 &size,
 			 (void *)&buf,
-- 
2.7.4


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



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

  Powered by Linux