diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-04-26 18:49:04 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-05-17 13:49:13 +0100 |
commit | e5333ed09e0f8ece3cbb37912c17cf9880ee3fb0 (patch) | |
tree | 09bba6a75cd7725d45c0b782656bc2f3e2c8aaae /include/linux/iio | |
parent | 15ea2878bfb255099092634d28f31177f237ccd7 (diff) | |
download | linux-stable-e5333ed09e0f8ece3cbb37912c17cf9880ee3fb0.tar.gz linux-stable-e5333ed09e0f8ece3cbb37912c17cf9880ee3fb0.tar.bz2 linux-stable-e5333ed09e0f8ece3cbb37912c17cf9880ee3fb0.zip |
iio: avoid shadowing of variable name in to_iio_dev_opaque()
indio_dev was both the macro input parameter and the field name
in this macro. That causes trouble if the instance of
struct iio_dev passed in is not called indio_dev.
Whilst a fix of sorts, no need to backport as it seems we never
hit this previously due to some very consistent naming in IIO.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20210426174911.397061-3-jic23@kernel.org
Diffstat (limited to 'include/linux/iio')
-rw-r--r-- | include/linux/iio/iio-opaque.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/iio/iio-opaque.h b/include/linux/iio/iio-opaque.h index e66b029d99de..f876e3aede2c 100644 --- a/include/linux/iio/iio-opaque.h +++ b/include/linux/iio/iio-opaque.h @@ -48,7 +48,7 @@ struct iio_dev_opaque { #endif }; -#define to_iio_dev_opaque(indio_dev) \ - container_of(indio_dev, struct iio_dev_opaque, indio_dev) +#define to_iio_dev_opaque(_indio_dev) \ + container_of((_indio_dev), struct iio_dev_opaque, indio_dev) #endif |