On 04/10/2012 10:21 PM, Jonathan Cameron wrote: > This macro is being removed to simplify ongoing maintenance > so we need to unwind and remaining users. > > Signed-off-by: Jonathan Cameron <jic23@xxxxxxxxxx> Looks good, but it might makes sense to add a macro here, because the two channel specs only differ in the number of realbits (and shift). Acked-by: Lars-Peter Clausen <lars@xxxxxxxxxx> > --- > drivers/staging/iio/adc/ad7780.c | 30 ++++++++++++++++++++++++------ > 1 file changed, 24 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c > index a13e58c..4f0a6c9 100644 > --- a/drivers/staging/iio/adc/ad7780.c > +++ b/drivers/staging/iio/adc/ad7780.c > @@ -126,14 +126,32 @@ static int ad7780_read_raw(struct iio_dev *indio_dev, > > static const struct ad7780_chip_info ad7780_chip_info_tbl[] = { > [ID_AD7780] = { > - .channel = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - 0, 0, IIO_ST('s', 24, 32, 8), 0), > + .channel = { > + .type = IIO_VOLTAGE, > + .indexed = 1, > + .channel = 0, > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + .shift = 8, > + }, > + }, > }, > [ID_AD7781] = { > - .channel = IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - 0, 0, IIO_ST('s', 20, 32, 12), 0), > + .channel = { > + .type = IIO_VOLTAGE, > + .indexed = 1, > + .channel = 0, > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .scan_type = { > + .sign = 's', > + .realbits = 20, > + .storagebits = 32, > + .shift = 12, > + }, > + }, > }, > }; > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html