Commit e8a26c5b authored by Jonathan Cameron's avatar Jonathan Cameron

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: 7247645f ("iio: hmc5843: Move hmc5843 out of staging")
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarMatt Ranostay <matt.ranostay@konsulko.com>
Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: default avatarH. Nikolaus Schaller <hns@goldelico.com>
Link: https://lore.kernel.org/r/20200913112546.715624-1-jic23@kernel.org
parent cd7798cb
...@@ -245,7 +245,7 @@ static const struct iio_enum hmc5843_meas_conf_enum = { ...@@ -245,7 +245,7 @@ static const struct iio_enum hmc5843_meas_conf_enum = {
}; };
static const struct iio_chan_spec_ext_info hmc5843_ext_info[] = { 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_ENUM_AVAILABLE("meas_conf", &hmc5843_meas_conf_enum),
IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, hmc5843_get_mount_matrix), IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, hmc5843_get_mount_matrix),
{ } { }
...@@ -259,7 +259,7 @@ static const struct iio_enum hmc5983_meas_conf_enum = { ...@@ -259,7 +259,7 @@ static const struct iio_enum hmc5983_meas_conf_enum = {
}; };
static const struct iio_chan_spec_ext_info hmc5983_ext_info[] = { 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_ENUM_AVAILABLE("meas_conf", &hmc5983_meas_conf_enum),
IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, hmc5843_get_mount_matrix), IIO_MOUNT_MATRIX(IIO_SHARED_BY_DIR, hmc5843_get_mount_matrix),
{ } { }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment