From: Jonathan Cameron <jic23@kernel.org>
To: Abhash Jha <abhashkumarjha123@gmail.com>
Cc: linux-iio@vger.kernel.org,
angelogioacchino.delregno@collabora.com, matthias.bgg@gmail.com,
lars@metafoo.de, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Gene Chen <gene_chen@richtek.com>
Subject: Re: [PATCH] iio: adc: mt6360-adc: Converted to use get_unaligned_be16()
Date: Sun, 29 Sep 2024 17:48:45 +0100 [thread overview]
Message-ID: <20240929174845.5bac3f62@jic23-huawei> (raw)
In-Reply-To: <20240928161108.163647-1-abhashkumarjha123@gmail.com>
On Sat, 28 Sep 2024 21:41:08 +0530
Abhash Jha <abhashkumarjha123@gmail.com> wrote:
> Changed the manual shifting and adding of bytes to use
> get_unaligned_be16() api instead.
>
> Signed-off-by: Abhash Jha <abhashkumarjha123@gmail.com>
Looks simple so I've applied it, but plenty of time for
additional reviews to come in.
Jonathan
> ---
> drivers/iio/adc/mt6360-adc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/mt6360-adc.c b/drivers/iio/adc/mt6360-adc.c
> index 3710473e5..91befe2cd 100644
> --- a/drivers/iio/adc/mt6360-adc.c
> +++ b/drivers/iio/adc/mt6360-adc.c
> @@ -124,7 +124,7 @@ static int mt6360_adc_read_channel(struct mt6360_adc_data *mad, int channel, int
> usleep_range(ADC_LOOP_TIME_US / 2, ADC_LOOP_TIME_US);
> }
>
> - *val = rpt[1] << 8 | rpt[2];
> + *val = get_unaligned_be16(&rpt[1]);
> ret = IIO_VAL_INT;
>
> out_adc_conv:
prev parent reply other threads:[~2024-09-29 16:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-28 16:11 [PATCH] iio: adc: mt6360-adc: Converted to use get_unaligned_be16() Abhash Jha
2024-09-29 16:48 ` 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=20240929174845.5bac3f62@jic23-huawei \
--to=jic23@kernel.org \
--cc=abhashkumarjha123@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=gene_chen@richtek.com \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@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