summaryrefslogtreecommitdiff
path: root/include/linux/iio
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2020-05-21 18:53:22 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-06-14 11:49:50 +0100
commit18d563858d97dbefc9a16c8210ef2f97dc264202 (patch)
treedb6a1891e4685c7536fe6baeb333c6b6d6a76497 /include/linux/iio
parentcd64d3579d58f2aa547c1cff856d24169263f765 (diff)
iio: make iio_device_get_drvdata take a const struct iio_dev *.
As this just calls dev_get_drvdata underneath which is happy with a const struct device * we should change and avoid potentially casting away a const in order to then put it back again. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/iio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index a1be82e74c93..e846a0a7001e 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -669,7 +669,7 @@ static inline void iio_device_set_drvdata(struct iio_dev *indio_dev, void *data)
*
* Returns the data previously set with iio_device_set_drvdata()
*/
-static inline void *iio_device_get_drvdata(struct iio_dev *indio_dev)
+static inline void *iio_device_get_drvdata(const struct iio_dev *indio_dev)
{
return dev_get_drvdata(&indio_dev->dev);
}