From: Alexey Brodkin Date: Thu, 3 Jan 2013 09:35:23 +0000 (+0400) Subject: block: systemace: Added missing "else" in "ace_writew" X-Git-Tag: v2013.04-rc1~63^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7cde9f35d6753d17348512e944f0fe5c31af0acf;p=u-boot block: systemace: Added missing "else" in "ace_writew" System ACE compact flash controller supports either 8-bit (default) or 16-bit data transfers. And in corresponding driver we need to implement read/write of 16-bit data words properly for both modes of operation. In existing code if width==8 both branches get executed which may cause unexpected behavior of SystemAce controller. Addition of "else" fixes described issue and execution is done as expected for both (8-bit and 16-bit) data bus widths. Signed-off-by: Alexey Brodkin Signed-off-by: Michal Simek --- diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c index 247cf060e4..87c6cbc6a0 100644 --- a/drivers/block/systemace.c +++ b/drivers/block/systemace.c @@ -65,8 +65,8 @@ static void ace_writew(u16 val, unsigned off) writeb(val, base + off); writeb(val >> 8, base + off + 1); #endif - } - out16(base + off, val); + } else + out16(base + off, val); } static u16 ace_readw(unsigned off)