iio:mag:mag3110 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:50 +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/magnetometer/mag3110.c

index becf54496967aee126fb6449b54341394645d9bd..4b65b6d3bdb17696027f58c34887befaaa209671 100644 (file)
@@ -266,7 +266,11 @@ static const struct iio_chan_spec mag3110_channels[] = {
                .type = IIO_TEMP,
                .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
                .scan_index = 3,
-               .scan_type = IIO_ST('s', 8, 8, 0),
+               .scan_type = {
+                       .sign = 's',
+                       .realbits = 8,
+                       .storagebits = 8,
+                       },
        },
        IIO_CHAN_SOFT_TIMESTAMP(4),
 };