
30 Aug
2013
30 Aug
'13
3:43 p.m.
On Mon, Jul 6, 2009 at 10:11 AM, Kumar Gala galak@kernel.crashing.org wrote:
#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
Four years later, I just noticed that this code is wrong. It should be && instead of ||.