[PATCH 6/6] spi: cadence-quadspi: drop redundant match data lookup

Johan Hovold
2026-04-21T12:54:06Z

Use the OF match data stored at probe instead of looking it up again on
driver unbind.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/spi/spi-cadence-quadspi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index f9f2313413cb..8ffc6c5f9888 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -2005,13 +2005,10 @@ static int cqspi_probe(struct platform_device *pdev)

static void cqspi_remove(struct platform_device *pdev)
{
- const struct cqspi_driver_platdata *ddata;
struct cqspi_st *cqspi = platform_get_drvdata(pdev);
- struct device *dev = &pdev->dev;
+ const struct cqspi_driver_platdata *ddata = cqspi->ddata;
int ret = 0;

- ddata = of_device_get_match_data(dev);
-
spi_unregister_controller(cqspi->host);

refcount_set(&cqspi->refcount, 0);
--
2.52.0