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> Couldn't spot any real differences to the autogenerated cocci patch. Acked-by: Lars-Peter Clausen <lars@xxxxxxxxxx> > --- > drivers/staging/iio/meter/ade7758_core.c | 256 +++++++++++++++++++++++------- > 1 file changed, 196 insertions(+), 60 deletions(-) > > diff --git a/drivers/staging/iio/meter/ade7758_core.c b/drivers/staging/iio/meter/ade7758_core.c > index 9374d6b..4d6bffa 100644 > --- a/drivers/staging/iio/meter/ade7758_core.c > +++ b/drivers/staging/iio/meter/ade7758_core.c > @@ -662,66 +662,202 @@ static const struct attribute_group ade7758_attribute_group = { > }; > > static struct iio_chan_spec ade7758_channels[] = { > - IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "raw", 0, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE), > - 0, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_CURRENT, 0, 1, 0, "raw", 0, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT), > - 1, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_POWER, 0, 1, 0, "apparent_raw", 0, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR), > - 2, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_POWER, 0, 1, 0, "active_raw", 0, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR), > - 3, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_POWER, 0, 1, 0, "reactive_raw", 0, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR), > - 4, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "raw", 1, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE), > - 5, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_CURRENT, 0, 1, 0, "raw", 1, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT), > - 6, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_POWER, 0, 1, 0, "apparent_raw", 1, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR), > - 7, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_POWER, 0, 1, 0, "active_raw", 1, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR), > - 8, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_POWER, 0, 1, 0, "reactive_raw", 1, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_B, AD7758_REACT_PWR), > - 9, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "raw", 2, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE), > - 10, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_CURRENT, 0, 1, 0, "raw", 2, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT), > - 11, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_POWER, 0, 1, 0, "apparent_raw", 2, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR), > - 12, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_POWER, 0, 1, 0, "active_raw", 2, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR), > - 13, IIO_ST('s', 24, 32, 0), 0), > - IIO_CHAN(IIO_POWER, 0, 1, 0, "reactive_raw", 2, 0, > - IIO_CHAN_INFO_SCALE_SHARED_BIT, > - AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR), > - 14, IIO_ST('s', 24, 32, 0), 0), > + { > + .type = IIO_VOLTAGE, > + .indexed = 1, > + .channel = 0, > + .extend_name = "raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE), > + .scan_index = 0, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_CURRENT, > + .indexed = 1, > + .channel = 0, > + .extend_name = "raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT), > + .scan_index = 1, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_POWER, > + .indexed = 1, > + .channel = 0, > + .extend_name = "apparent_raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR), > + .scan_index = 2, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_POWER, > + .indexed = 1, > + .channel = 0, > + .extend_name = "active_raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR), > + .scan_index = 3, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_POWER, > + .indexed = 1, > + .channel = 0, > + .extend_name = "reactive_raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR), > + .scan_index = 4, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_VOLTAGE, > + .indexed = 1, > + .channel = 1, > + .extend_name = "raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE), > + .scan_index = 5, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_CURRENT, > + .indexed = 1, > + .channel = 1, > + .extend_name = "raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT), > + .scan_index = 6, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_POWER, > + .indexed = 1, > + .channel = 1, > + .extend_name = "apparent_raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR), > + .scan_index = 7, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_POWER, > + .indexed = 1, > + .channel = 1, > + .extend_name = "active_raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR), > + .scan_index = 8, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_POWER, > + .indexed = 1, > + .channel = 1, > + .extend_name = "reactive_raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_B, AD7758_REACT_PWR), > + .scan_index = 9, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_VOLTAGE, > + .indexed = 1, > + .channel = 2, > + .extend_name = "raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE), > + .scan_index = 10, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_CURRENT, > + .indexed = 1, > + .channel = 2, > + .extend_name = "raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT), > + .scan_index = 11, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_POWER, > + .indexed = 1, > + .channel = 2, > + .extend_name = "apparent_raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR), > + .scan_index = 12, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_POWER, > + .indexed = 1, > + .channel = 2, > + .extend_name = "active_raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR), > + .scan_index = 13, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, { > + .type = IIO_POWER, > + .indexed = 1, > + .channel = 2, > + .extend_name = "reactive_raw", > + .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, > + .address = AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR), > + .scan_index = 14, > + .scan_type = { > + .sign = 's', > + .realbits = 24, > + .storagebits = 32, > + }, > + }, > IIO_CHAN_SOFT_TIMESTAMP(15), > }; > -- 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