Skip to contentSkip to conversation

arm: at91: fix NAND bus width decoding from system_rev

PATCH RESEND New Christian Hitz 1 participant 1 message Oct 24, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 arm: at91: fix NAND bus width decoding from system_rev

Make it safe to assign the return value of this function to u8/u16 variables.

Cc Andrew Victor <[email protected]>
Cc Nicolas Ferre <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
---
  arch/arm/mach-at91/include/mach/system_rev.h |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-at91/include/mach/system_rev.h index 8f48660..ec164a4 100644

arch/arm/mach-at91/include/mach/system_rev.h +1 -1
@@ -19,7 +19,7 @@
  #define BOARD_HAVE_NAND_16BIT	(1 << 31)
  static inline int board_have_nand_16bit(void)
  {
-	return system_rev & BOARD_HAVE_NAND_16BIT;
+	return (system_rev & BOARD_HAVE_NAND_16BIT) ? 1 : 0;
  }
   #endif /* __ARCH_SYSTEM_REV_H__ */
Signature · 1 line
1.7.4.1