Linux-IIO Archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Petre Rodan <petre.rodan@subdimension.ro>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: pressure: hsc030pa: Use spi_read()
Date: Sun, 24 Mar 2024 13:51:10 +0000	[thread overview]
Message-ID: <20240324135110.1e71572d@jic23-huawei> (raw)
In-Reply-To: <8327ac591d244ac85aa83c01e559076159c7ba12.1711283728.git.christophe.jaillet@wanadoo.fr>

On Sun, 24 Mar 2024 13:36:16 +0100
Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:

> Use spi_read() instead of hand-writing it.
> It is less verbose.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to the togreg-normal branch of iio.git.

Thanks,

Jonathan

> ---
> Compile test only
> ---
>  drivers/iio/pressure/hsc030pa_spi.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/iio/pressure/hsc030pa_spi.c b/drivers/iio/pressure/hsc030pa_spi.c
> index 818fa6303454..337eecc577d2 100644
> --- a/drivers/iio/pressure/hsc030pa_spi.c
> +++ b/drivers/iio/pressure/hsc030pa_spi.c
> @@ -23,14 +23,9 @@
>  static int hsc_spi_recv(struct hsc_data *data)
>  {
>  	struct spi_device *spi = to_spi_device(data->dev);
> -	struct spi_transfer xfer = {
> -		.tx_buf = NULL,
> -		.rx_buf = data->buffer,
> -		.len = HSC_REG_MEASUREMENT_RD_SIZE,
> -	};
>  
>  	msleep_interruptible(HSC_RESP_TIME_MS);
> -	return spi_sync_transfer(spi, &xfer, 1);
> +	return spi_read(spi, data->buffer, HSC_REG_MEASUREMENT_RD_SIZE);
>  }
>  
>  static int hsc_spi_probe(struct spi_device *spi)


      reply	other threads:[~2024-03-24 13:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-24 12:36 [PATCH] iio: pressure: hsc030pa: Use spi_read() Christophe JAILLET
2024-03-24 13:51 ` 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=20240324135110.1e71572d@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petre.rodan@subdimension.ro \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).