linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>, linux-iio@vger.kernel.org
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	"H . Nikolaus Schaller" <hns@goldelico.com>
Subject: Re: [PATCH] iio:magn:hmc5843: Fix passing true where iio_shared_by enum required.
Date: Fri, 18 Sep 2020 15:35:31 +0200	[thread overview]
Message-ID: <f8db43ea-bef2-b29c-22a3-c9f074957e5c@metafoo.de> (raw)
In-Reply-To: <20200913112546.715624-1-jic23@kernel.org>

On 9/13/20 1:25 PM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> 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!
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Fixes: 7247645f6865 ("iio: hmc5843: Move hmc5843 out of staging")
> Cc: H. Nikolaus Schaller <hns@goldelico.com>

Obviously correct.

Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>

> ---
>   drivers/iio/magnetometer/hmc5843_core.c | 4 ++--
>   1 file 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),
>   	{ }



  reply	other threads:[~2020-09-18 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13 11:25 [PATCH] iio:magn:hmc5843: Fix passing true where iio_shared_by enum required Jonathan Cameron
2020-09-18 13:35 ` Lars-Peter Clausen [this message]
2020-09-18 19:15 ` Matt Ranostay
2020-09-19 12:10   ` Jonathan Cameron
2020-09-20 17:12 ` H. Nikolaus Schaller
2020-09-21 18:06   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8db43ea-bef2-b29c-22a3-c9f074957e5c@metafoo.de \
    --to=lars@metafoo.de \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=hns@goldelico.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).