From nobody Thu Nov 14 16:27:41 2024 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7F53127B4E for ; Wed, 7 Feb 2024 18:43:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707331407; cv=none; b=emazosLJdg6+6fHHQFDRiyGU5P73jyzunGYsMkL0n17AxOdKsQzxFgEKLS04bh5nLC/FEYX0wRwAmREtXVFCToNUQKUU5WN6in7ci55LwtZ463JgA7wOnW3iwoHj0Flpws+0muW0BPQsClCAWnmgmAHbsJWfMC19a90HurHUCX0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707331407; c=relaxed/simple; bh=QNjTOjgMkPoejERfadeuNwuWQefzL/dP2hf3G6y/d/M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=T3Z8aPUX+Hp/A3ixFhQtY9ZtRRjylWy18POux28hFQoQF5j1gtdT2uedHvdlR2TJ59raoluvlaqirX+HzMp7FExHw14XHOhqIGwfp0oV5UCerC3uEJ/dhpPOyiMwPpJZhOCb1XiyoBZE+pbD4Vj2fe9IVZxTuD7FiJy8jLxBeaQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rXmt8-0007fL-6w; Wed, 07 Feb 2024 19:43:14 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rXmt6-0054Xl-JM; Wed, 07 Feb 2024 19:43:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rXmt6-00HRso-1e; Wed, 07 Feb 2024 19:43:12 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Mark Brown Cc: kernel@pengutronix.de, Michal Simek , Max Filippov , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jonathan Cameron Subject: [PATCH v3 16/32] spi: bitbang: Follow renaming of SPI "master" to "controller" Date: Wed, 7 Feb 2024 19:40:30 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=18502; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=QNjTOjgMkPoejERfadeuNwuWQefzL/dP2hf3G6y/d/M=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlw86o12KC//K1c8+t4IU/1iD+0q2q9n9mycSL0 nVhRL6AJd6JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZcPOqAAKCRCPgPtYfRL+ Tkn1CACWhZlQCNd1of+IQ7smnLXeKb58x88Chhk5hMftJSjNI8guZ+fbNBvRMFjFOevsPYZsKeN 426041IMthnCIvY+BciuSwbEwOlIoocQJHmhSvY7qhxtqZuFea6+wz8ot1dscyKpAP0kBYZXWao cVhGJNoPVc9wzBQ0uP44XWJ/KYD1/i9FT9Ww2+xojjM1FWPGLr92KDoGaRdt18brxDYd1QO0X3v ehomADEKbGm24BIb1eEbUAmZ3VGTZGm4F8sSOzng3kiDFPizoVjJ9a8Nf8ySMoaQbN+H0uv7I0D hhvywY0MEZDVbIAz3Sflt6jMU0oE1PmiU9/qf6gkq/JDpSH2 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org In commit 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"") some functions and struct members were renamed. To not break all drivers compatibility macros were provided. To be able to remove these compatibility macros push the renaming into the SPI bitbang controller drivers. Acked-by: Jonathan Cameron Signed-off-by: Uwe Kleine-K=C3=B6nig --- drivers/spi/spi-ath79.c | 4 +-- drivers/spi/spi-au1550.c | 2 +- drivers/spi/spi-bitbang.c | 64 ++++++++++++++++----------------- drivers/spi/spi-butterfly.c | 6 ++-- drivers/spi/spi-davinci.c | 6 ++-- drivers/spi/spi-gpio.c | 2 +- drivers/spi/spi-lm70llp.c | 6 ++-- drivers/spi/spi-oc-tiny.c | 6 ++-- drivers/spi/spi-omap-uwire.c | 4 +-- drivers/spi/spi-sh-sci.c | 10 +++--- drivers/spi/spi-xilinx.c | 4 +-- drivers/spi/spi-xtensa-xtfpga.c | 2 +- include/linux/spi/spi_bitbang.h | 2 +- 13 files changed, 59 insertions(+), 59 deletions(-) diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index b7ada981464a..d78762d4db98 100644 --- a/drivers/spi/spi-ath79.c +++ b/drivers/spi/spi-ath79.c @@ -189,7 +189,7 @@ static int ath79_spi_probe(struct platform_device *pdev) host->num_chipselect =3D 3; host->mem_ops =3D &ath79_mem_ops; =20 - sp->bitbang.master =3D host; + sp->bitbang.ctlr =3D host; sp->bitbang.chipselect =3D ath79_spi_chipselect; sp->bitbang.txrx_word[SPI_MODE_0] =3D ath79_spi_txrx_mode0; sp->bitbang.flags =3D SPI_CS_HIGH; @@ -237,7 +237,7 @@ static void ath79_spi_remove(struct platform_device *pd= ev) =20 spi_bitbang_stop(&sp->bitbang); ath79_spi_disable(sp); - spi_controller_put(sp->bitbang.master); + spi_controller_put(sp->bitbang.ctlr); } =20 static void ath79_spi_shutdown(struct platform_device *pdev) diff --git a/drivers/spi/spi-au1550.c b/drivers/spi/spi-au1550.c index 1011b1a8f241..825d2f1cdff8 100644 --- a/drivers/spi/spi-au1550.c +++ b/drivers/spi/spi-au1550.c @@ -800,7 +800,7 @@ static int au1550_spi_probe(struct platform_device *pde= v) =20 init_completion(&hw->host_done); =20 - hw->bitbang.master =3D hw->host; + hw->bitbang.ctlr =3D hw->host; hw->bitbang.setup_transfer =3D au1550_spi_setupxfer; hw->bitbang.chipselect =3D au1550_spi_chipsel; hw->bitbang.txrx_bufs =3D au1550_spi_txrx_bufs; diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c index ecd44016c197..a0e2204fc039 100644 --- a/drivers/spi/spi-bitbang.c +++ b/drivers/spi/spi-bitbang.c @@ -187,7 +187,7 @@ int spi_bitbang_setup(struct spi_device *spi) bool initial_setup =3D false; int retval; =20 - bitbang =3D spi_master_get_devdata(spi->master); + bitbang =3D spi_controller_get_devdata(spi->controller); =20 if (!cs) { cs =3D kzalloc(sizeof(*cs), GFP_KERNEL); @@ -236,7 +236,7 @@ static int spi_bitbang_bufs(struct spi_device *spi, str= uct spi_transfer *t) unsigned nsecs =3D cs->nsecs; struct spi_bitbang *bitbang; =20 - bitbang =3D spi_master_get_devdata(spi->master); + bitbang =3D spi_controller_get_devdata(spi->controller); if (bitbang->set_line_direction) { int err; =20 @@ -268,11 +268,11 @@ static int spi_bitbang_bufs(struct spi_device *spi, s= truct spi_transfer *t) * transfer-at-a-time ones to leverage dma or fifo hardware. */ =20 -static int spi_bitbang_prepare_hardware(struct spi_master *spi) +static int spi_bitbang_prepare_hardware(struct spi_controller *spi) { struct spi_bitbang *bitbang; =20 - bitbang =3D spi_master_get_devdata(spi); + bitbang =3D spi_controller_get_devdata(spi); =20 mutex_lock(&bitbang->lock); bitbang->busy =3D 1; @@ -281,11 +281,11 @@ static int spi_bitbang_prepare_hardware(struct spi_ma= ster *spi) return 0; } =20 -static int spi_bitbang_transfer_one(struct spi_master *master, +static int spi_bitbang_transfer_one(struct spi_controller *ctlr, struct spi_device *spi, struct spi_transfer *transfer) { - struct spi_bitbang *bitbang =3D spi_master_get_devdata(master); + struct spi_bitbang *bitbang =3D spi_controller_get_devdata(ctlr); int status =3D 0; =20 if (bitbang->setup_transfer) { @@ -303,16 +303,16 @@ static int spi_bitbang_transfer_one(struct spi_master= *master, status =3D -EREMOTEIO; =20 out: - spi_finalize_current_transfer(master); + spi_finalize_current_transfer(ctlr); =20 return status; } =20 -static int spi_bitbang_unprepare_hardware(struct spi_master *spi) +static int spi_bitbang_unprepare_hardware(struct spi_controller *spi) { struct spi_bitbang *bitbang; =20 - bitbang =3D spi_master_get_devdata(spi); + bitbang =3D spi_controller_get_devdata(spi); =20 mutex_lock(&bitbang->lock); bitbang->busy =3D 0; @@ -323,7 +323,7 @@ static int spi_bitbang_unprepare_hardware(struct spi_ma= ster *spi) =20 static void spi_bitbang_set_cs(struct spi_device *spi, bool enable) { - struct spi_bitbang *bitbang =3D spi_master_get_devdata(spi->master); + struct spi_bitbang *bitbang =3D spi_controller_get_devdata(spi->controlle= r); =20 /* SPI core provides CS high / low, but bitbang driver * expects CS active @@ -341,10 +341,10 @@ static void spi_bitbang_set_cs(struct spi_device *spi= , bool enable) =20 int spi_bitbang_init(struct spi_bitbang *bitbang) { - struct spi_master *master =3D bitbang->master; + struct spi_controller *ctlr =3D bitbang->ctlr; bool custom_cs; =20 - if (!master) + if (!ctlr) return -EINVAL; /* * We only need the chipselect callback if we are actually using it. @@ -352,39 +352,39 @@ int spi_bitbang_init(struct spi_bitbang *bitbang) * SPI_CONTROLLER_GPIO_SS flag is set, we always need to call the * driver-specific chipselect routine. */ - custom_cs =3D (!master->use_gpio_descriptors || - (master->flags & SPI_CONTROLLER_GPIO_SS)); + custom_cs =3D (!ctlr->use_gpio_descriptors || + (ctlr->flags & SPI_CONTROLLER_GPIO_SS)); =20 if (custom_cs && !bitbang->chipselect) return -EINVAL; =20 mutex_init(&bitbang->lock); =20 - if (!master->mode_bits) - master->mode_bits =3D SPI_CPOL | SPI_CPHA | bitbang->flags; + if (!ctlr->mode_bits) + ctlr->mode_bits =3D SPI_CPOL | SPI_CPHA | bitbang->flags; =20 - if (master->transfer || master->transfer_one_message) + if (ctlr->transfer || ctlr->transfer_one_message) return -EINVAL; =20 - master->prepare_transfer_hardware =3D spi_bitbang_prepare_hardware; - master->unprepare_transfer_hardware =3D spi_bitbang_unprepare_hardware; - master->transfer_one =3D spi_bitbang_transfer_one; + ctlr->prepare_transfer_hardware =3D spi_bitbang_prepare_hardware; + ctlr->unprepare_transfer_hardware =3D spi_bitbang_unprepare_hardware; + ctlr->transfer_one =3D spi_bitbang_transfer_one; /* * When using GPIO descriptors, the ->set_cs() callback doesn't even * get called unless SPI_CONTROLLER_GPIO_SS is set. */ if (custom_cs) - master->set_cs =3D spi_bitbang_set_cs; + ctlr->set_cs =3D spi_bitbang_set_cs; =20 if (!bitbang->txrx_bufs) { bitbang->use_dma =3D 0; bitbang->txrx_bufs =3D spi_bitbang_bufs; - if (!master->setup) { + if (!ctlr->setup) { if (!bitbang->setup_transfer) bitbang->setup_transfer =3D spi_bitbang_setup_transfer; - master->setup =3D spi_bitbang_setup; - master->cleanup =3D spi_bitbang_cleanup; + ctlr->setup =3D spi_bitbang_setup; + ctlr->cleanup =3D spi_bitbang_cleanup; } } =20 @@ -411,18 +411,18 @@ EXPORT_SYMBOL_GPL(spi_bitbang_init); * master methods. Those methods are the defaults if the bitbang->txrx_bu= fs * routine isn't initialized. * - * This routine registers the spi_master, which will process requests in a + * This routine registers the spi_controller, which will process requests = in a * dedicated task, keeping IRQs unblocked most of the time. To stop * processing those requests, call spi_bitbang_stop(). * - * On success, this routine will take a reference to master. The caller is - * responsible for calling spi_bitbang_stop() to decrement the reference a= nd - * spi_master_put() as counterpart of spi_alloc_master() to prevent a memo= ry + * On success, this routine will take a reference to the controller. The c= aller + * is responsible for calling spi_bitbang_stop() to decrement the referenc= e and + * spi_controller_put() as counterpart of spi_alloc_master() to prevent a = memory * leak. */ int spi_bitbang_start(struct spi_bitbang *bitbang) { - struct spi_master *master =3D bitbang->master; + struct spi_controller *ctlr =3D bitbang->ctlr; int ret; =20 ret =3D spi_bitbang_init(bitbang); @@ -432,9 +432,9 @@ int spi_bitbang_start(struct spi_bitbang *bitbang) /* driver may get busy before register() returns, especially * if someone registered boardinfo for devices */ - ret =3D spi_register_master(spi_master_get(master)); + ret =3D spi_register_controller(spi_controller_get(ctlr)); if (ret) - spi_master_put(master); + spi_controller_put(ctlr); =20 return ret; } @@ -445,7 +445,7 @@ EXPORT_SYMBOL_GPL(spi_bitbang_start); */ void spi_bitbang_stop(struct spi_bitbang *bitbang) { - spi_unregister_master(bitbang->master); + spi_unregister_controller(bitbang->ctlr); } EXPORT_SYMBOL_GPL(spi_bitbang_stop); =20 diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c index 289b4454242a..1d267e6c22a4 100644 --- a/drivers/spi/spi-butterfly.c +++ b/drivers/spi/spi-butterfly.c @@ -205,7 +205,7 @@ static void butterfly_attach(struct parport *p) host->bus_num =3D 42; host->num_chipselect =3D 2; =20 - pp->bitbang.master =3D host; + pp->bitbang.ctlr =3D host; pp->bitbang.chipselect =3D butterfly_chipselect; pp->bitbang.txrx_word[SPI_MODE_0] =3D butterfly_txrx_word_mode0; =20 @@ -263,7 +263,7 @@ static void butterfly_attach(struct parport *p) pp->info[0].platform_data =3D &flash; pp->info[0].chip_select =3D 1; pp->info[0].controller_data =3D pp; - pp->dataflash =3D spi_new_device(pp->bitbang.master, &pp->info[0]); + pp->dataflash =3D spi_new_device(pp->bitbang.ctlr, &pp->info[0]); if (pp->dataflash) pr_debug("%s: dataflash at %s\n", p->name, dev_name(&pp->dataflash->dev)); @@ -308,7 +308,7 @@ static void butterfly_detach(struct parport *p) parport_release(pp->pd); parport_unregister_device(pp->pd); =20 - spi_controller_put(pp->bitbang.master); + spi_controller_put(pp->bitbang.ctlr); } =20 static struct parport_driver butterfly_driver =3D { diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 5688be245c68..be3998104bfb 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -459,7 +459,7 @@ static bool davinci_spi_can_dma(struct spi_controller *= host, =20 static int davinci_spi_check_error(struct davinci_spi *dspi, int int_statu= s) { - struct device *sdev =3D dspi->bitbang.master->dev.parent; + struct device *sdev =3D dspi->bitbang.ctlr->dev.parent; =20 if (int_status & SPIFLG_TIMEOUT_MASK) { dev_err(sdev, "SPI Time-out Error\n"); @@ -742,7 +742,7 @@ static irqreturn_t davinci_spi_irq(s32 irq, void *data) =20 static int davinci_spi_request_dma(struct davinci_spi *dspi) { - struct device *sdev =3D dspi->bitbang.master->dev.parent; + struct device *sdev =3D dspi->bitbang.ctlr->dev.parent; =20 dspi->dma_rx =3D dma_request_chan(sdev, "rx"); if (IS_ERR(dspi->dma_rx)) @@ -913,7 +913,7 @@ static int davinci_spi_probe(struct platform_device *pd= ev) if (ret) goto free_host; =20 - dspi->bitbang.master =3D host; + dspi->bitbang.ctlr =3D host; =20 dspi->clk =3D devm_clk_get_enabled(&pdev->dev, NULL); if (IS_ERR(dspi->clk)) { diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index d8db4564b406..909cce109bba 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c @@ -427,7 +427,7 @@ static int spi_gpio_probe(struct platform_device *pdev) host->cleanup =3D spi_gpio_cleanup; =20 bb =3D &spi_gpio->bitbang; - bb->master =3D host; + bb->ctlr =3D host; /* * There is some additional business, apart from driving the CS GPIO * line, that we need to do on selection. This makes the local diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c index e6a65b5c8c31..f982bdebd028 100644 --- a/drivers/spi/spi-lm70llp.c +++ b/drivers/spi/spi-lm70llp.c @@ -212,7 +212,7 @@ static void spi_lm70llp_attach(struct parport *p) /* * SPI and bitbang hookup. */ - pp->bitbang.master =3D host; + pp->bitbang.ctlr =3D host; pp->bitbang.chipselect =3D lm70_chipselect; pp->bitbang.txrx_word[SPI_MODE_0] =3D lm70_txrx; pp->bitbang.flags =3D SPI_3WIRE; @@ -264,7 +264,7 @@ static void spi_lm70llp_attach(struct parport *p) * the board info's (void *)controller_data. */ pp->info.controller_data =3D pp; - pp->spidev_lm70 =3D spi_new_device(pp->bitbang.master, &pp->info); + pp->spidev_lm70 =3D spi_new_device(pp->bitbang.ctlr, &pp->info); if (pp->spidev_lm70) dev_dbg(&pp->spidev_lm70->dev, "spidev_lm70 at %s\n", dev_name(&pp->spidev_lm70->dev)); @@ -309,7 +309,7 @@ static void spi_lm70llp_detach(struct parport *p) parport_release(pp->pd); parport_unregister_device(pp->pd); =20 - spi_controller_put(pp->bitbang.master); + spi_controller_put(pp->bitbang.ctlr); =20 lm70llp =3D NULL; } diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c index cf7c111088a6..6ea38f5e7d64 100644 --- a/drivers/spi/spi-oc-tiny.c +++ b/drivers/spi/spi-oc-tiny.c @@ -194,7 +194,7 @@ static int tiny_spi_of_probe(struct platform_device *pd= ev) =20 if (!np) return 0; - hw->bitbang.master->dev.of_node =3D pdev->dev.of_node; + hw->bitbang.ctlr->dev.of_node =3D pdev->dev.of_node; if (!of_property_read_u32(np, "clock-frequency", &val)) hw->freq =3D val; if (!of_property_read_u32(np, "baud-width", &val)) @@ -229,7 +229,7 @@ static int tiny_spi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, hw); =20 /* setup the state for the bitbang driver */ - hw->bitbang.master =3D host; + hw->bitbang.ctlr =3D host; hw->bitbang.setup_transfer =3D tiny_spi_setup_transfer; hw->bitbang.txrx_bufs =3D tiny_spi_txrx_bufs; =20 @@ -274,7 +274,7 @@ static int tiny_spi_probe(struct platform_device *pdev) static void tiny_spi_remove(struct platform_device *pdev) { struct tiny_spi *hw =3D platform_get_drvdata(pdev); - struct spi_controller *host =3D hw->bitbang.master; + struct spi_controller *host =3D hw->bitbang.ctlr; =20 spi_bitbang_stop(&hw->bitbang); spi_controller_put(host); diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 2dd1c1bcf4bf..210a98d903fa 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c @@ -448,7 +448,7 @@ static void uwire_off(struct uwire_spi *uwire) { uwire_write_reg(UWIRE_SR3, 0); clk_disable_unprepare(uwire->ck); - spi_controller_put(uwire->bitbang.master); + spi_controller_put(uwire->bitbang.ctlr); } =20 static int uwire_probe(struct platform_device *pdev) @@ -493,7 +493,7 @@ static int uwire_probe(struct platform_device *pdev) host->setup =3D uwire_setup; host->cleanup =3D uwire_cleanup; =20 - uwire->bitbang.master =3D host; + uwire->bitbang.ctlr =3D host; uwire->bitbang.chipselect =3D uwire_chipselect; uwire->bitbang.setup_transfer =3D uwire_setup_transfer; uwire->bitbang.txrx_bufs =3D uwire_txrx; diff --git a/drivers/spi/spi-sh-sci.c b/drivers/spi/spi-sh-sci.c index 148d615d2f38..3d560b154ad3 100644 --- a/drivers/spi/spi-sh-sci.c +++ b/drivers/spi/spi-sh-sci.c @@ -136,9 +136,9 @@ static int sh_sci_spi_probe(struct platform_device *dev) } =20 /* setup spi bitbang adaptor */ - sp->bitbang.master =3D host; - sp->bitbang.master->bus_num =3D sp->info->bus_num; - sp->bitbang.master->num_chipselect =3D sp->info->num_chipselect; + sp->bitbang.ctlr =3D host; + sp->bitbang.ctlr->bus_num =3D sp->info->bus_num; + sp->bitbang.ctlr->num_chipselect =3D sp->info->num_chipselect; sp->bitbang.chipselect =3D sh_sci_spi_chipselect; =20 sp->bitbang.txrx_word[SPI_MODE_0] =3D sh_sci_spi_txrx_mode0; @@ -166,7 +166,7 @@ static int sh_sci_spi_probe(struct platform_device *dev) setbits(sp, PIN_INIT, 0); iounmap(sp->membase); err1: - spi_controller_put(sp->bitbang.master); + spi_controller_put(sp->bitbang.ctlr); err0: return ret; } @@ -178,7 +178,7 @@ static void sh_sci_spi_remove(struct platform_device *d= ev) spi_bitbang_stop(&sp->bitbang); setbits(sp, PIN_INIT, 0); iounmap(sp->membase); - spi_controller_put(sp->bitbang.master); + spi_controller_put(sp->bitbang.ctlr); } =20 static struct platform_driver sh_sci_spi_drv =3D { diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index 12355957be97..7795328427a6 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c @@ -434,7 +434,7 @@ static int xilinx_spi_probe(struct platform_device *pde= v) =20 xspi =3D spi_controller_get_devdata(host); xspi->cs_inactive =3D 0xffffffff; - xspi->bitbang.master =3D host; + xspi->bitbang.ctlr =3D host; xspi->bitbang.chipselect =3D xilinx_spi_chipselect; xspi->bitbang.setup_transfer =3D xilinx_spi_setup_transfer; xspi->bitbang.txrx_bufs =3D xilinx_spi_txrx_bufs; @@ -516,7 +516,7 @@ static void xilinx_spi_remove(struct platform_device *p= dev) /* Disable the global IPIF interrupt */ xspi->write_fn(0, regs_base + XIPIF_V123B_DGIER_OFFSET); =20 - spi_controller_put(xspi->bitbang.master); + spi_controller_put(xspi->bitbang.ctlr); } =20 /* work with hotplug and coldplug */ diff --git a/drivers/spi/spi-xtensa-xtfpga.c b/drivers/spi/spi-xtensa-xtfpg= a.c index 3c7721894376..3c2cda315397 100644 --- a/drivers/spi/spi-xtensa-xtfpga.c +++ b/drivers/spi/spi-xtensa-xtfpga.c @@ -93,7 +93,7 @@ static int xtfpga_spi_probe(struct platform_device *pdev) host->dev.of_node =3D pdev->dev.of_node; =20 xspi =3D spi_controller_get_devdata(host); - xspi->bitbang.master =3D host; + xspi->bitbang.ctlr =3D host; xspi->bitbang.chipselect =3D xtfpga_spi_chipselect; xspi->bitbang.txrx_word[SPI_MODE_0] =3D xtfpga_spi_txrx_word; xspi->regs =3D devm_platform_ioremap_resource(pdev, 0); diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitban= g.h index 4444c2a992cb..b930eca2ef7b 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h @@ -10,7 +10,7 @@ struct spi_bitbang { u8 use_dma; u16 flags; /* extra spi->mode support */ =20 - struct spi_master *master; + struct spi_controller *ctlr; =20 /* setup_transfer() changes clock and/or wordsize to match settings * for this transfer; zeroes restore defaults from spi_device. --=20 2.43.0