From: Jonathan Cameron Date: Thu, 14 Jul 2011 09:24:02 +0000 (+0100) Subject: staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register. X-Git-Tag: next-20110726~5^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e1703b329f7c7ea82ea181dc4c50020f25061a2c;p=karo-tx-linux.git staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register. Build tested only. Signed-off-by: Jonathan Cameron Reported-by: Randy Dunlap Acked-by: Randy Dunlap Acked-by: Michael Hennerich Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/meter/ade7753.c b/drivers/staging/iio/meter/ade7753.c index 59f47fd893c3..4d1bd42ff9e0 100644 --- a/drivers/staging/iio/meter/ade7753.c +++ b/drivers/staging/iio/meter/ade7753.c @@ -398,9 +398,9 @@ static ssize_t ade7753_read_frequency(struct device *dev, char *buf) { int ret, len = 0; - u8 t; + u16 t; int sps; - ret = ade7753_spi_read_reg_8(dev, ADE7753_MODE, &t); + ret = ade7753_spi_read_reg_16(dev, ADE7753_MODE, &t); if (ret) return ret;