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> > --- > drivers/staging/iio/adc/ad7476_core.c | 45 +++++++++++++++------------------ > 1 file changed, 21 insertions(+), 24 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7476_core.c b/drivers/staging/iio/adc/ad7476_core.c > index 0c064d1..a703693 100644 > --- a/drivers/staging/iio/adc/ad7476_core.c > +++ b/drivers/staging/iio/adc/ad7476_core.c > @@ -66,53 +66,50 @@ static int ad7476_read_raw(struct iio_dev *indio_dev, > return -EINVAL; > } > > +#define AD7476_CHAN(bits, sh) \ Since shift + bits is always 12 we can simplify this a bit more and make it just take the number of bits and calculate the shift. > + { \ > + .type = IIO_VOLTAGE, \ > + .indexed = 1, \ > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, \ > + .scan_type = { \ > + .sign = 'u', \ > + .realbits = bits, \ > + .storagebits = 16, \ > + .shift = sh, \ > + }, \ > +} -- 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