public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	daniel.baluta@nxp.com, kernel-janitors@vger.kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio:magnetometer: Replace magic number 0 by IIO_CHAN_INFO_RAW
Date: Sat, 03 Mar 2018 15:23:35 +0000	[thread overview]
Message-ID: <20180303152335.4c287ede@archlinux> (raw)
In-Reply-To: <20180227144755.ifbzn5gekm345nk5@smtp.gmail.com>

On Tue, 27 Feb 2018 11:47:55 -0300
Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> wrote:

> The function magn_3d_read_raw has a switch statement handling multiple
> cases per channel. The first case statement uses the magic number 0,
> which means IIO_CHAN_INFO_RAW. Additionally, the iio_chan_spec for
> magn_3d_channels is configured to be IIO_CHAN_INFO_RAW. Therefore, this
> patch replaces the magic number 0 for the appropriate IIO_CHAN_INFO_RAW.
> 
> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Applied to the togreg branch of iio.git and pushed out as testing.

Thanks,

Jonathan
> ---
>  drivers/iio/magnetometer/hid-sensor-magn-3d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> index a1fd9d591818..d55c4885211a 100644
> --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> @@ -167,7 +167,7 @@ static int magn_3d_read_raw(struct iio_dev *indio_dev,
>  	*val = 0;
>  	*val2 = 0;
>  	switch (mask) {
> -	case 0:
> +	case IIO_CHAN_INFO_RAW:
>  		hid_sensor_power_state(&magn_state->magn_flux_attributes, true);
>  		report_id >  			magn_state->magn[chan->address].report_id;


      reply	other threads:[~2018-03-03 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 14:47 [PATCH] iio:magnetometer: Replace magic number 0 by IIO_CHAN_INFO_RAW Rodrigo Siqueira
2018-03-03 15:23 ` Jonathan Cameron [this message]

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=20180303152335.4c287ede@archlinux \
    --to=jic23@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=rodrigosiqueiramelo@gmail.com \
    /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