aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorUwe Kleine-König2021-10-07 14:14:13 +0200
committerMark Brown2021-10-07 15:45:57 +0100
commitbdc7ca008e1f5539e891187032cb2cbbc3decb5e (patch)
tree37a101f8f3c39c1db35e81e92f7e759091f3154e /drivers/spi
parent6bfb15f34dd8c8a073e03a31c485ef5774b127df (diff)
spi: Remove unused function spi_busnum_to_master()
The last user is gone since commit 2962db71c703 ("staging/fbtft: Remove fbtft_device") in 2019. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20211007121415.2401638-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index ff4254dc64af..cc4ac42aa93d 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3033,41 +3033,6 @@ int spi_controller_resume(struct spi_controller *ctlr)
}
EXPORT_SYMBOL_GPL(spi_controller_resume);
-static int __spi_controller_match(struct device *dev, const void *data)
-{
- struct spi_controller *ctlr;
- const u16 *bus_num = data;
-
- ctlr = container_of(dev, struct spi_controller, dev);
- return ctlr->bus_num == *bus_num;
-}
-
-/**
- * spi_busnum_to_master - look up master associated with bus_num
- * @bus_num: the master's bus number
- * Context: can sleep
- *
- * This call may be used with devices that are registered after
- * arch init time. It returns a refcounted pointer to the relevant
- * spi_controller (which the caller must release), or NULL if there is
- * no such master registered.
- *
- * Return: the SPI master structure on success, else NULL.
- */
-struct spi_controller *spi_busnum_to_master(u16 bus_num)
-{
- struct device *dev;
- struct spi_controller *ctlr = NULL;
-
- dev = class_find_device(&spi_master_class, NULL, &bus_num,
- __spi_controller_match);
- if (dev)
- ctlr = container_of(dev, struct spi_controller, dev);
- /* reference got in class_find_device */
- return ctlr;
-}
-EXPORT_SYMBOL_GPL(spi_busnum_to_master);
-
/*-------------------------------------------------------------------------*/
/* Core methods for SPI resource management */