Use IIO_CHAN_SOFT_TIMESTAMP() to define the timestamp channel instead of
manually filling in the struct iio_chan_spec fields. This makes the code
less verbose and mistake-prone.
Also drop obvious comment while we're at it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
return -EINVAL;
}
- /* Timestamp */
channel++;
- channel->type = IIO_TIMESTAMP;
- channel->channel = -1;
- channel->scan_index = 1;
- channel->scan_type.sign = 's';
- channel->scan_type.realbits = 64;
- channel->scan_type.storagebits = 64;
+ *channel = IIO_CHAN_SOFT_TIMESTAMP(1);
indio_dev->channels = state->channels;