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 11/21] spi: cadence-xspi: switch to use modern name
Date: Fri, 28 Jul 2023 17:32:11 +0800	[thread overview]
Message-ID: <20230728093221.3312026-12-yangyingliang@huawei.com> (raw)
In-Reply-To: <20230728093221.3312026-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-cadence-xspi.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/spi/spi-cadence-xspi.c b/drivers/spi/spi-cadence-xspi.c
index 11d623cbba2e..b7e04b03be58 100644
--- a/drivers/spi/spi-cadence-xspi.c
+++ b/drivers/spi/spi-cadence-xspi.c
@@ -419,7 +419,7 @@ static int cdns_xspi_mem_op_execute(struct spi_mem *mem,
 				    const struct spi_mem_op *op)
 {
 	struct cdns_xspi_dev *cdns_xspi =
-		spi_master_get_devdata(mem->spi->master);
+		spi_controller_get_devdata(mem->spi->controller);
 	int ret = 0;
 
 	ret = cdns_xspi_mem_op(cdns_xspi, mem, op);
@@ -430,7 +430,7 @@ static int cdns_xspi_mem_op_execute(struct spi_mem *mem,
 static int cdns_xspi_adjust_mem_op_size(struct spi_mem *mem, struct spi_mem_op *op)
 {
 	struct cdns_xspi_dev *cdns_xspi =
-		spi_master_get_devdata(mem->spi->master);
+		spi_controller_get_devdata(mem->spi->controller);
 
 	op->data.nbytes = clamp_val(op->data.nbytes, 0, cdns_xspi->sdmasize);
 
@@ -527,26 +527,26 @@ static void cdns_xspi_print_phy_config(struct cdns_xspi_dev *cdns_xspi)
 static int cdns_xspi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct spi_master *master = NULL;
+	struct spi_controller *host = NULL;
 	struct cdns_xspi_dev *cdns_xspi = NULL;
 	struct resource *res;
 	int ret;
 
-	master = devm_spi_alloc_master(dev, sizeof(*cdns_xspi));
-	if (!master)
+	host = devm_spi_alloc_host(dev, sizeof(*cdns_xspi));
+	if (!host)
 		return -ENOMEM;
 
-	master->mode_bits = SPI_3WIRE | SPI_TX_DUAL  | SPI_TX_QUAD  |
+	host->mode_bits = SPI_3WIRE | SPI_TX_DUAL  | SPI_TX_QUAD  |
 		SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_OCTAL | SPI_RX_OCTAL |
 		SPI_MODE_0  | SPI_MODE_3;
 
-	master->mem_ops = &cadence_xspi_mem_ops;
-	master->dev.of_node = pdev->dev.of_node;
-	master->bus_num = -1;
+	host->mem_ops = &cadence_xspi_mem_ops;
+	host->dev.of_node = pdev->dev.of_node;
+	host->bus_num = -1;
 
-	platform_set_drvdata(pdev, master);
+	platform_set_drvdata(pdev, host);
 
-	cdns_xspi = spi_master_get_devdata(master);
+	cdns_xspi = spi_controller_get_devdata(host);
 	cdns_xspi->pdev = pdev;
 	cdns_xspi->dev = &pdev->dev;
 	cdns_xspi->cur_cs = 0;
@@ -596,15 +596,15 @@ static int cdns_xspi_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	master->num_chipselect = 1 << cdns_xspi->hw_num_banks;
+	host->num_chipselect = 1 << cdns_xspi->hw_num_banks;
 
-	ret = devm_spi_register_master(dev, master);
+	ret = devm_spi_register_controller(dev, host);
 	if (ret) {
-		dev_err(dev, "Failed to register SPI master\n");
+		dev_err(dev, "Failed to register SPI host\n");
 		return ret;
 	}
 
-	dev_info(dev, "Successfully registered SPI master\n");
+	dev_info(dev, "Successfully registered SPI host\n");
 
 	return 0;
 }
-- 
2.25.1


  parent reply	other threads:[~2023-07-28  9:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  9:32 [PATCH -next 00/21] spi: switch to use modern name Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 01/21] spi: amd: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 02/21] spi: aspeed: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 03/21] spi: spi-axi-spi-engine: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 04/21] spi: bcm-qspi: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 05/21] spi: bcm2835: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 06/21] spi: bcm2835aux: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 07/21] spi: bcm63xx-hsspi: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 08/21] spi: bcm63xx: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 09/21] spi: butterfly: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 10/21] spi: cadence-quadspi: " Yang Yingliang
2023-08-07 13:37   ` Mark Brown
2023-07-28  9:32 ` Yang Yingliang [this message]
2023-07-28  9:32 ` [PATCH -next 12/21] spi: cadence: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 13/21] spi: clps711x: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 14/21] spi: octeon: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 15/21] spi: spi-cavium-thunderx: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 16/21] spi: coldfire-qspi: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 17/21] spi: davinci: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 18/21] spi: dln2: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 19/21] spi: dw: " Yang Yingliang
2023-07-29  1:22   ` Serge Semin
2023-07-28  9:32 ` [PATCH -next 20/21] spi: hisi-kunpeng: " Yang Yingliang
2023-07-28  9:32 ` [PATCH -next 21/21] spi: npcm-fiu: " Yang Yingliang
2023-08-07 21:57 ` [PATCH -next 00/21] spi: " 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=20230728093221.3312026-12-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.