diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-12-05 21:37:16 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-08 19:36:13 (GMT) |
commit | 18cffbedc2c4af8a83816a9ee17a010138abd36b (patch) | |
tree | 0f54e3be6f48f76a8ce7f2255036b07a5cf28602 /drivers/staging/iio | |
parent | c52cfb638d5f10223d60841c3a6dac913701a18d (diff) | |
download | linux-18cffbedc2c4af8a83816a9ee17a010138abd36b.tar.xz |
staging:iio:adc:max1363 correctly set channels as big endian.
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>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/adc/max1363_core.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/staging/iio/adc/max1363_core.c b/drivers/staging/iio/adc/max1363_core.c index 7e078fc..9febd1b 100644 --- a/drivers/staging/iio/adc/max1363_core.c +++ b/drivers/staging/iio/adc/max1363_core.c @@ -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, \ } |