Skip to content

Commit 07d4655

Browse files
committed
iio:drop IIO_ST macro
This macro no longer allows all the elements of the scan_type structure to be set. Missinterpretation of the parameters also caused a couple of recent bugs. No mainline drivers now use this macro so drop it. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 33be5fd commit 07d4655

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎include/linux/iio/iio.h‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,16 @@ static inline bool iio_channel_has_info(const struct iio_chan_spec *chan,
254254
(chan->info_mask_shared_by_all & BIT(type));
255255
}
256256

257-
#define IIO_ST(si, rb, sb, sh) \
258-
{ .sign = si, .realbits = rb, .storagebits = sb, .shift = sh }
259-
260-
#define IIO_CHAN_SOFT_TIMESTAMP(_si) \
261-
{ .type = IIO_TIMESTAMP, .channel = -1, \
262-
.scan_index = _si, .scan_type = IIO_ST('s', 64, 64, 0) }
257+
#define IIO_CHAN_SOFT_TIMESTAMP(_si) { \
258+
.type = IIO_TIMESTAMP, \
259+
.channel = -1, \
260+
.scan_index = _si, \
261+
.scan_type = { \
262+
.sign = 's', \
263+
.realbits = 64, \
264+
.storagebits = 64, \
265+
}, \
266+
}
263267

264268
/**
265269
* iio_get_time_ns() - utility function to get a time stamp for events etc

0 commit comments

Comments
 (0)