diff options
| author | Jonathan Cameron <[email protected]> | 2020-09-13 12:25:46 +0100 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2020-09-21 18:54:18 +0100 |
| commit | e8a26c5b767b5ffc541f1c80336f2faa802441f4 (patch) | |
| tree | 7f599fabe651f3e96b8137f15e20b115c928bfd7 | |
| parent | cd7798cbd28044a3026619e36993160ba8fa118d (diff) | |
iio:magn:hmc5843: Fix passing true where iio_shared_by enum required.
So it's obvious that the code is wrong in passing true, but I'm assuming
that will actually evaluate to 1 and hence IIO_SHARED_BY_TYPE.
The documentation however has this attribute as IIO_SHARED_BY_ALL.
My current assumption is the documentation is wrong.
If anyone knows otherwise please shout out!
Fixes: 7247645f6865 ("iio: hmc5843: Move hmc5843 out of staging")
Signed-off-by: Jonathan Cameron <[email protected]>
Reviewed-by: Matt Ranostay <[email protected]>
Reviewed-by: Lars-Peter Clausen <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Tested-by: H. Nikolaus Schaller <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
| -rw-r--r-- | drivers/iio/magnetometer/hmc5843_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/magnetometer/hmc5843_core.c b/drivers/iio/magnetometer/hmc5843_core.c index 1474ba63babe..780faea61d82 100644 --- a/drivers/iio/magnetometer/hmc5843_core.c +++ b/drivers/iio/magnetometer/hmc5843_core.c @@ -245,7 +245,7 @@ static const struct iio_enum hmc5843_meas_conf_enum = { }; static const struct iio_chan_spec_ext_info hmc5843_ext_info[] = { - IIO_ENUM("meas_conf", true, &hmc5843_meas_conf_enum), + IIO_ENUM("meas_conf", IIO_SHARED_BY_TYPE, &hmc5843_meas_conf_enum), IIO_ENUM_AVAILABLE("meas_conf", &hmc5843_meas_conf_enum), IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, hmc5843_get_mount_matrix), { } @@ -259,7 +259,7 @@ static const struct iio_enum hmc5983_meas_conf_enum = { }; static const struct iio_chan_spec_ext_info hmc5983_ext_info[] = { - IIO_ENUM("meas_conf", true, &hmc5983_meas_conf_enum), + IIO_ENUM("meas_conf", IIO_SHARED_BY_TYPE, &hmc5983_meas_conf_enum), IIO_ENUM_AVAILABLE("meas_conf", &hmc5983_meas_conf_enum), IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, hmc5843_get_mount_matrix), { } |