]> git.sur5r.net Git - u-boot/blobdiff - board/freescale/common/sys_eeprom.c
fsl: Fix compiler warnings from gcc-4.4 in sys_eeprom code
[u-boot] / board / freescale / common / sys_eeprom.c
index ae5304a9b45ed42ec1e038374fef7941f3e11ba8..3e1e3321695de7279c3d53eb8fa7a51ab48cc75e 100644 (file)
@@ -78,12 +78,14 @@ static int has_been_read = 0;
 
 #ifdef CONFIG_SYS_I2C_EEPROM_NXID
 /* Is this a valid NXID EEPROM? */
-#define is_valid (*((u32 *)e.id) == (('N' << 24) | ('X' << 16) | ('I' << 8) | 'D'))
+#define is_valid ((e.id[0] == 'N') || (e.id[1] == 'X') || \
+                 (e.id[2] == 'I') || (e.id[3] == 'D'))
 #endif
 
 #ifdef CONFIG_SYS_I2C_EEPROM_CCID
 /* Is this a valid CCID EEPROM? */
-#define is_valid (*((u32 *)e.id) == (('C' << 24) | ('C' << 16) | ('I' << 8) | 'D'))
+#define is_valid ((e.id[0] == 'C') || (e.id[1] == 'C') || \
+                 (e.id[2] == 'I') || (e.id[3] == 'D'))
 #endif
 
 /**