summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab8500-spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/ab8500-spi.c')
-rw-r--r--drivers/mfd/ab8500-spi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mfd/ab8500-spi.c b/drivers/mfd/ab8500-spi.c
index b81d4f768ef6..e1c8b62b086d 100644
--- a/drivers/mfd/ab8500-spi.c
+++ b/drivers/mfd/ab8500-spi.c
@@ -68,7 +68,12 @@ static int ab8500_spi_read(struct ab8500 *ab8500, u16 addr)
ret = spi_sync(spi, &msg);
if (!ret)
- ret = ab8500->rx_buf[0];
+ /*
+ * Only the 8 lowermost bytes are
+ * defined with value, the rest may
+ * vary depending on chip/board noise.
+ */
+ ret = ab8500->rx_buf[0] & 0xFFU;
return ret;
}