mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 02:12:00 -04:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user