diff mbox series

[v1,1/1] spi: rspi: Get rid of unused struct rspi_plat_data

Message ID 20240307155045.3796045-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Superseded
Headers show
Series [v1,1/1] spi: rspi: Get rid of unused struct rspi_plat_data | expand

Commit Message

Andy Shevchenko March 7, 2024, 3:50 p.m. UTC
No in-kernel users of struct rspi_plat_data. If required,
the software nodes should be used for such users. For now
just get rid of it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-rspi.c   | 11 +----------
 include/linux/spi/rspi.h | 18 ------------------
 2 files changed, 1 insertion(+), 28 deletions(-)
 delete mode 100644 include/linux/spi/rspi.h

Comments

Mark Brown March 25, 2024, 2:08 p.m. UTC | #1
On Thu, Mar 07, 2024 at 05:50:45PM +0200, Andy Shevchenko wrote:
> No in-kernel users of struct rspi_plat_data. If required,
> the software nodes should be used for such users. For now
> just get rid of it.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/spi/spi-rspi.c   | 11 +----------
>  include/linux/spi/rspi.h | 18 ------------------

This breaks the build:

/build/stage/linux/drivers/spi/spi-rspi.c:27:10: fatal error: linux/spi/rspi.h: No such file or directory
   27 | #include <linux/spi/rspi.h>
      |          ^~~~~~~~~~~~~~~~~~
Andy Shevchenko March 25, 2024, 2:20 p.m. UTC | #2
On Mon, Mar 25, 2024 at 02:08:49PM +0000, Mark Brown wrote:
> On Thu, Mar 07, 2024 at 05:50:45PM +0200, Andy Shevchenko wrote:

...

> >  drivers/spi/spi-rspi.c   | 11 +----------
> >  include/linux/spi/rspi.h | 18 ------------------
> 
> This breaks the build:
> 
> /build/stage/linux/drivers/spi/spi-rspi.c:27:10: fatal error: linux/spi/rspi.h: No such file or directory
>    27 | #include <linux/spi/rspi.h>
>       |          ^~~~~~~~~~~~~~~~~~

Indeed... Yet another driver that depends on the custom ARCH_*.
I'll send v2. At least now it compiles on x86_64.
Mark Brown March 25, 2024, 8:29 p.m. UTC | #3
On Thu, 07 Mar 2024 17:50:45 +0200, Andy Shevchenko wrote:
> No in-kernel users of struct rspi_plat_data. If required,
> the software nodes should be used for such users. For now
> just get rid of it.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: rspi: Get rid of unused struct rspi_plat_data
      commit: bdeef5dcea6b164f4bd614655821b1ef12ebec9a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 8e81f1a8623f..54f61580c579 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -1131,16 +1131,12 @@  static struct dma_chan *rspi_request_dma_chan(struct device *dev,
 static int rspi_request_dma(struct device *dev, struct spi_controller *ctlr,
 			    const struct resource *res)
 {
-	const struct rspi_plat_data *rspi_pd = dev_get_platdata(dev);
 	unsigned int dma_tx_id, dma_rx_id;
 
 	if (dev->of_node) {
 		/* In the OF case we will get the slave IDs from the DT */
 		dma_tx_id = 0;
 		dma_rx_id = 0;
-	} else if (rspi_pd && rspi_pd->dma_tx_id && rspi_pd->dma_rx_id) {
-		dma_tx_id = rspi_pd->dma_tx_id;
-		dma_rx_id = rspi_pd->dma_rx_id;
 	} else {
 		/* The driver assumes no error. */
 		return 0;
@@ -1290,7 +1286,6 @@  static int rspi_probe(struct platform_device *pdev)
 	struct spi_controller *ctlr;
 	struct rspi_data *rspi;
 	int ret;
-	const struct rspi_plat_data *rspi_pd;
 	const struct spi_ops *ops;
 	unsigned long clksrc;
 
@@ -1305,11 +1300,7 @@  static int rspi_probe(struct platform_device *pdev)
 			goto error1;
 	} else {
 		ops = (struct spi_ops *)pdev->id_entry->driver_data;
-		rspi_pd = dev_get_platdata(&pdev->dev);
-		if (rspi_pd && rspi_pd->num_chipselect)
-			ctlr->num_chipselect = rspi_pd->num_chipselect;
-		else
-			ctlr->num_chipselect = 2; /* default */
+		ctlr->num_chipselect = 2; /* default */
 	}
 
 	rspi = spi_controller_get_devdata(ctlr);
diff --git a/include/linux/spi/rspi.h b/include/linux/spi/rspi.h
deleted file mode 100644
index dbdfcc7a3db2..000000000000
--- a/include/linux/spi/rspi.h
+++ /dev/null
@@ -1,18 +0,0 @@ 
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Renesas SPI driver
- *
- * Copyright (C) 2012  Renesas Solutions Corp.
- */
-
-#ifndef __LINUX_SPI_RENESAS_SPI_H__
-#define __LINUX_SPI_RENESAS_SPI_H__
-
-struct rspi_plat_data {
-	unsigned int dma_tx_id;
-	unsigned int dma_rx_id;
-
-	u16 num_chipselect;
-};
-
-#endif