From a724e1b38b26949468830e6f708e4de0ac5a9a2e Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 2 Jan 2013 16:20:51 +0100 Subject: [PATCH] block: systemace: Fix incorrect ace_write for width 16 Current implementation works fine for bus width = 16 bits because we never get into "if" branch. If one sets width to 8 bits there will be 2 consequent data accesses write: 1. Correct data access for 8-bit bus 2. Unconditional (and in this case incorrect) data access as if data bus is 16-bit wide Signed-off-by: Alexey Brodkin Signed-off-by: Michal Simek --- drivers/block/systemace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c index 247cf060e43..b1a3914cc38 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) -- 2.47.3