staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register.
authorJonathan Cameron <jic23@cam.ac.uk>
Thu, 14 Jul 2011 09:24:02 +0000 (10:24 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 Jul 2011 20:25:23 +0000 (13:25 -0700)
Build tested only.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/meter/ade7753.c

index 59f47fd893c34217c217e19682438af426647443..4d1bd42ff9e0f2fffead34f2bc2fa2fef65785f5 100644 (file)
@@ -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;