iio:accel:bma180 replaces IIO_ST macro with explicit entries to struct scan_type
authorJonathan Cameron <jic23@kernel.org>
Wed, 11 Dec 2013 18:45:00 +0000 (18:45 +0000)
committerJonathan Cameron <jic23@kernel.org>
Tue, 17 Dec 2013 20:55:01 +0000 (20:55 +0000)
The IIO_ST macro no longer covers all the elements of struct scan_type
and has this has lead to some bugs being introduced.

The drivers are easier to follow with this structure being directly
filled so that is now preferred.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
drivers/iio/accel/bma180.c

index 28b39283bccffaad1fdd13950aaa62dabd2d7248..3bec9220df04e2a16ade76727dee9851ab1dee7e 100644 (file)
@@ -455,7 +455,12 @@ static const struct iio_chan_spec_ext_info bma180_ext_info[] = {
                BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY),       \
        .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),           \
        .scan_index = (_index),                                         \
-       .scan_type = IIO_ST('s', 14, 16, 2),                            \
+       .scan_type = {                                                  \
+               .sign = 's',                                            \
+               .realbits = 14,                                         \
+               .storagebits = 16,                                      \
+               .shift = 2,                                             \
+       },                                                              \
        .ext_info = bma180_ext_info,                                    \
 }