iio: consumer: Mark struct iio_channel parameter to iio_get_channel_type() const
Jonathan Cameron
maintainerPATCH v2 1/1 iio: consumer: Mark struct iio_channel parameter to iio_get_channel_type() const
From: Jonathan Cameron <[email protected]>
This accessor is only reading data via this pointer, so make the fact it is const explicit.
Signed-off-by Jonathan Cameron <[email protected]>
---
v2: the content to match the description. ooops.
Used in a clean up to sound/soc/samsung/aries_wm8994 where the struct iio_channel pointer is marked const.
--- drivers/iio/inkern.c | 2 +- include/linux/iio/consumer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/iio/inkern.c +1 -1
@@ -912,7 +912,7 @@ int iio_read_max_channel_raw(struct iio_channel *chan, int *val) }EXPORT_SYMBOL_GPL (iio_read_max_channel_raw); -int iio_get_channel_type (struct iio_channel *chan,enum iio_chan_type *type) +int iio_get_channel_type (const struct iio_channel *chan,enum iio_chan_type *type) {struct iio_dev_opaque *iio_dev_opaque =to_iio_dev_opaque (chan->indio_dev);int ret =0 ;
include/linux/iio/consumer.h +1 -1
@@ -335,7 +335,7 @@ int iio_read_avail_channel_attribute(struct iio_channel *chan,* * returns the enum iio_chan_type of the channel */ -int iio_get_channel_type (struct iio_channel *channel, +int iio_get_channel_type (const struct iio_channel *channel,enum iio_chan_type *type);/**
Signature · 1 line
2.37.2