From: Colin Foster <colin.foster@in-advantage.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Lee Jones <lee@kernel.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mfd: ocelot-spi: Use spi_sync_transfer()
Date: Thu, 4 Apr 2024 14:38:37 -0500 [thread overview]
Message-ID: <Zg8BvZbrwbi6uzLc@euler> (raw)
In-Reply-To: <7af920eb686b719cb7eb39c832e3ad414e0e1e1a.1712258667.git.christophe.jaillet@wanadoo.fr>
On Thu, Apr 04, 2024 at 09:25:09PM +0200, Christophe JAILLET wrote:
> Use spi_sync_transfer() instead of hand-writing it.
> It is less verbose.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/mfd/ocelot-spi.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mfd/ocelot-spi.c b/drivers/mfd/ocelot-spi.c
> index 94f82677675b..b015c8683f1b 100644
> --- a/drivers/mfd/ocelot-spi.c
> +++ b/drivers/mfd/ocelot-spi.c
> @@ -145,7 +145,6 @@ static int ocelot_spi_regmap_bus_read(void *context, const void *reg, size_t reg
> struct device *dev = context;
> struct ocelot_ddata *ddata;
> struct spi_device *spi;
> - struct spi_message msg;
> unsigned int index = 0;
>
> ddata = dev_get_drvdata(dev);
> @@ -166,9 +165,7 @@ static int ocelot_spi_regmap_bus_read(void *context, const void *reg, size_t reg
> xfers[index].len = val_size;
> index++;
>
> - spi_message_init_with_transfers(&msg, xfers, index);
> -
> - return spi_sync(spi, &msg);
> + return spi_sync_transfer(spi, xfers, index);
> }
>
Thanks! I am fighting an unrelated SPI regression, so I tested against 6.7
Reviewed-by: Colin Foster <colin.foster@in-advantage.com>
Tested-by: Colin Foster <colin.foster@in-advantage.com>
next prev parent reply other threads:[~2024-04-04 19:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 19:25 [PATCH] mfd: ocelot-spi: Use spi_sync_transfer() Christophe JAILLET
2024-04-04 19:38 ` Colin Foster [this message]
2024-04-11 12:50 ` (subset) " Lee Jones
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=Zg8BvZbrwbi6uzLc@euler \
--to=colin.foster@in-advantage.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@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