9
0
Fork 0

ARM: ccxmx53: properly guard initcall for multiimage

Make sure to not run this board specific initcall on any
other board.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Lucas Stach 2015-12-08 18:33:28 +01:00 committed by Sascha Hauer
parent ba624ae97e
commit 21854348c8
1 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,9 @@ static int ccwmx53_devices_init(void)
u8 hwid[6] = {0};
char manloc = 0;
if (!of_machine_is_compatible("digi,imx53-ccxmx53"))
return 0;
if ((imx_iim_read(1, 9, hwid, sizeof(hwid)) != sizeof(hwid)) ||
(hwid[0] < 0x02) ||
(hwid[0] >= ARRAY_SIZE(ccwmx53_ids))) {