summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2023-08-23 05:29:54 +0200
committerMark Brown <broonie@kernel.org>2023-09-11 02:31:39 +0200
commita3a77a4268929888ab3ce9e68c83f0d7e63505df (patch)
tree0cc06957fa68579ba3a70072047c8d27de12eddd /drivers
parentspi: mt7621: switch to use modern name (diff)
downloadlinux-a3a77a4268929888ab3ce9e68c83f0d7e63505df.tar.xz
linux-a3a77a4268929888ab3ce9e68c83f0d7e63505df.zip
spi: mtk-nor: switch to use modern name
Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230823033003.3407403-13-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-mtk-nor.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c
index cf4ee8b19e42..62b1c8995fa4 100644
--- a/drivers/spi/spi-mtk-nor.c
+++ b/drivers/spi/spi-mtk-nor.c
@@ -275,7 +275,7 @@ static void mtk_nor_adj_prg_size(struct spi_mem_op *op)
static int mtk_nor_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op)
{
- struct mtk_nor *sp = spi_controller_get_devdata(mem->spi->master);
+ struct mtk_nor *sp = spi_controller_get_devdata(mem->spi->controller);
if (!op->data.nbytes)
return 0;
@@ -598,7 +598,7 @@ static int mtk_nor_spi_mem_prg(struct mtk_nor *sp, const struct spi_mem_op *op)
static int mtk_nor_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
{
- struct mtk_nor *sp = spi_controller_get_devdata(mem->spi->master);
+ struct mtk_nor *sp = spi_controller_get_devdata(mem->spi->controller);
int ret;
if ((op->data.nbytes == 0) ||
@@ -639,7 +639,7 @@ static int mtk_nor_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
static int mtk_nor_setup(struct spi_device *spi)
{
- struct mtk_nor *sp = spi_controller_get_devdata(spi->master);
+ struct mtk_nor *sp = spi_controller_get_devdata(spi->controller);
if (spi->max_speed_hz && (spi->max_speed_hz < sp->spi_freq)) {
dev_err(&spi->dev, "spi clock should be %u Hz.\n",
@@ -651,10 +651,10 @@ static int mtk_nor_setup(struct spi_device *spi)
return 0;
}
-static int mtk_nor_transfer_one_message(struct spi_controller *master,
+static int mtk_nor_transfer_one_message(struct spi_controller *host,
struct spi_message *m)
{
- struct mtk_nor *sp = spi_controller_get_devdata(master);
+ struct mtk_nor *sp = spi_controller_get_devdata(host);
struct spi_transfer *t = NULL;
unsigned long trx_len = 0;
int stat = 0;
@@ -696,7 +696,7 @@ static int mtk_nor_transfer_one_message(struct spi_controller *master,
m->actual_length = trx_len;
msg_done:
m->status = stat;
- spi_finalize_current_message(master);
+ spi_finalize_current_message(host);
return 0;
}
@@ -844,7 +844,7 @@ static int mtk_nor_probe(struct platform_device *pdev)
return ret;
}
- ctlr = devm_spi_alloc_master(&pdev->dev, sizeof(*sp));
+ ctlr = devm_spi_alloc_host(&pdev->dev, sizeof(*sp));
if (!ctlr) {
dev_err(&pdev->dev, "failed to allocate spi controller\n");
return -ENOMEM;