From: Michael Hennerich Date: Fri, 2 Sep 2011 16:25:47 +0000 (+0100) Subject: staging:iio: ad7152: fix channel assignment for AD7153 X-Git-Tag: MMI-PSA29.97-13-9~18234^2^2~691 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15e3276fd020621236e8443a599b80ae28d6832b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging:iio: ad7152: fix channel assignment for AD7153 In case the AD7153 is selected we need to make sure we provide channel info for the first capacitance input in both single ended and differential configuration. Signed-off-by: Michael Hennerich Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/adc/ad7152.c b/drivers/staging/iio/adc/ad7152.c index 42996b96b850..f980a093882a 100644 --- a/drivers/staging/iio/adc/ad7152.c +++ b/drivers/staging/iio/adc/ad7152.c @@ -441,17 +441,17 @@ static const struct iio_chan_spec ad7152_channels[] = { (1 << IIO_CHAN_INFO_SCALE_SEPARATE), }, { .type = IIO_CAPACITANCE, + .differential = 1, .indexed = 1, - .channel = 1, + .channel = 0, + .channel2 = 2, .info_mask = (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE) | (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) | (1 << IIO_CHAN_INFO_SCALE_SEPARATE), }, { .type = IIO_CAPACITANCE, - .differential = 1, .indexed = 1, - .channel = 0, - .channel2 = 2, + .channel = 1, .info_mask = (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE) | (1 << IIO_CHAN_INFO_CALIBBIAS_SEPARATE) | (1 << IIO_CHAN_INFO_SCALE_SEPARATE),