All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-spi@vger.kernel.org>
Cc: <broonie@kernel.org>, <geert@linux-m68k.org>, <lukas@wunner.de>,
	<yangyingliang@huawei.com>
Subject: [PATCH -next 19/26] spi: xcomm: switch to use modern name
Date: Tue, 28 Nov 2023 17:30:24 +0800	[thread overview]
Message-ID: <20231128093031.3707034-20-yangyingliang@huawei.com> (raw)
In-Reply-To: <20231128093031.3707034-1-yangyingliang@huawei.com>

Change legacy name master to modern name host or controller.

No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/spi/spi-xcomm.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c
index a3d57554f5ba..63354dd3110f 100644
--- a/drivers/spi/spi-xcomm.c
+++ b/drivers/spi/spi-xcomm.c
@@ -132,10 +132,10 @@ static int spi_xcomm_txrx_bufs(struct spi_xcomm *spi_xcomm,
 	return t->len;
 }
 
-static int spi_xcomm_transfer_one(struct spi_master *master,
+static int spi_xcomm_transfer_one(struct spi_controller *host,
 	struct spi_message *msg)
 {
-	struct spi_xcomm *spi_xcomm = spi_master_get_devdata(master);
+	struct spi_xcomm *spi_xcomm = spi_controller_get_devdata(host);
 	unsigned int settings = spi_xcomm->settings;
 	struct spi_device *spi = msg->spi;
 	unsigned cs_change = 0;
@@ -197,7 +197,7 @@ static int spi_xcomm_transfer_one(struct spi_master *master,
 		spi_xcomm_chipselect(spi_xcomm, spi, false);
 
 	msg->status = status;
-	spi_finalize_current_message(master);
+	spi_finalize_current_message(host);
 
 	return status;
 }
@@ -205,27 +205,27 @@ static int spi_xcomm_transfer_one(struct spi_master *master,
 static int spi_xcomm_probe(struct i2c_client *i2c)
 {
 	struct spi_xcomm *spi_xcomm;
-	struct spi_master *master;
+	struct spi_controller *host;
 	int ret;
 
-	master = spi_alloc_master(&i2c->dev, sizeof(*spi_xcomm));
-	if (!master)
+	host = spi_alloc_host(&i2c->dev, sizeof(*spi_xcomm));
+	if (!host)
 		return -ENOMEM;
 
-	spi_xcomm = spi_master_get_devdata(master);
+	spi_xcomm = spi_controller_get_devdata(host);
 	spi_xcomm->i2c = i2c;
 
-	master->num_chipselect = 16;
-	master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_3WIRE;
-	master->bits_per_word_mask = SPI_BPW_MASK(8);
-	master->flags = SPI_CONTROLLER_HALF_DUPLEX;
-	master->transfer_one_message = spi_xcomm_transfer_one;
-	master->dev.of_node = i2c->dev.of_node;
-	i2c_set_clientdata(i2c, master);
+	host->num_chipselect = 16;
+	host->mode_bits = SPI_CPHA | SPI_CPOL | SPI_3WIRE;
+	host->bits_per_word_mask = SPI_BPW_MASK(8);
+	host->flags = SPI_CONTROLLER_HALF_DUPLEX;
+	host->transfer_one_message = spi_xcomm_transfer_one;
+	host->dev.of_node = i2c->dev.of_node;
+	i2c_set_clientdata(i2c, host);
 
-	ret = devm_spi_register_master(&i2c->dev, master);
+	ret = devm_spi_register_controller(&i2c->dev, host);
 	if (ret < 0)
-		spi_master_put(master);
+		spi_controller_put(host);
 
 	return ret;
 }
-- 
2.25.1


  parent reply	other threads:[~2023-11-28  9:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-28  9:30 [PATCH -next 00/26] spi: switch to use modern name (part5) Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 01/26] spi: sprd-adi: switch to use spi_alloc_host() Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 02/26] spi: sprd: switch to use modern name Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 03/26] spi: st-ssc4: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 04/26] spi: stm32-qspi: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 05/26] spi: stm32: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 06/26] spi: sun4i: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 07/26] spi: sun6i: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 08/26] spi: sunplus-sp7021: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 09/26] spi: synquacer: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 10/26] spi: geni-qcom: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 11/26] spi: tegra114: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 12/26] spi: tegra20-sflash: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 13/26] spi: tegra20-slink: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 14/26] spi: tegra210-quad: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 15/26] spi: spi-ti-qspi: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 16/26] spi: wpcm-fiu: switch to use devm_spi_alloc_host() Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 17/26] spi: topcliff-pch: switch to use modern name Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 18/26] spi: uniphier: " Yang Yingliang
2023-11-28  9:30 ` Yang Yingliang [this message]
2023-11-28  9:30 ` [PATCH -next 20/26] spi: xilinx: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 21/26] spi: xlp: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 22/26] spi: xtensa-xtfpga: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 23/26] spi: zynq-qspi: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 24/26] spi: zynqmp-gqspi: " Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 25/26] spi: cs42l43: switch to use devm_spi_alloc_host() Yang Yingliang
2023-11-28  9:30 ` [PATCH -next 26/26] spi: ljca: " Yang Yingliang
2023-12-12 15:46 ` [PATCH -next 00/26] spi: switch to use modern name (part5) Mark Brown

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=20231128093031.3707034-20-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=broonie@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lukas@wunner.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.