]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
staging:iio:adc:max1363 correctly set channels as big endian.
authorJonathan Cameron <jic23@cam.ac.uk>
Mon, 5 Dec 2011 21:37:16 +0000 (21:37 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Dec 2011 19:36:13 +0000 (11:36 -0800)
Also, the differential channels should always have been signed.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/adc/max1363_core.c

index 7e078fc13005aca786e55da042185a7cdcaaecdf..9febd1b4a06448d346e749e11a01d2e387c7ddfc 100644 (file)
@@ -298,7 +298,12 @@ static const enum max1363_modes max1363_mode_list[] = {
                .channel = num,                                         \
                .address = addr,                                        \
                .info_mask = MAX1363_INFO_MASK,                         \
-               .scan_type = IIO_ST('u', bits, (bits > 8) ? 16 : 8, 0), \
+               .scan_type = {                                          \
+                       .sign = 'u',                                    \
+                       .realbits = bits,                               \
+                       .storagebits = (bits > 8) ? 16 : 8,             \
+                       .endianness = IIO_BE,                           \
+               },                                                      \
                .scan_index = si,                                       \
                .event_mask = evmask,                                   \
        }
@@ -313,7 +318,12 @@ static const enum max1363_modes max1363_mode_list[] = {
                .channel2 = num2,                                       \
                .address = addr,                                        \
                .info_mask = MAX1363_INFO_MASK,                         \
-               .scan_type = IIO_ST('u', bits, (bits > 8) ? 16 : 8, 0), \
+               .scan_type = {                                          \
+                       .sign = 's',                                    \
+                       .realbits = bits,                               \
+                       .storagebits = (bits > 8) ? 16 : 8,             \
+                       .endianness = IIO_BE,                           \
+               },                                                      \
                .scan_index = si,                                       \
                .event_mask = evmask,                                   \
        }