Skip to content

Commit

Permalink
staging:iio:adc:max1363 correctly set channels as big endian.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent c52cfb6 commit 18cffbe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions drivers/staging/iio/adc/max1363_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
}
Expand All @@ -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, \
}
Expand Down

0 comments on commit 18cffbe

Please sign in to comment.