spi: Uninline spi_unregister_device()
Uninline spi_unregister_device() in preparation of adding more code to
it. Add kerneldoc documentation while we're at it.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index e2415be..3f135cc 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -604,6 +604,20 @@
}
EXPORT_SYMBOL_GPL(spi_new_device);
+/**
+ * spi_unregister_device - unregister a single SPI device
+ * @spi: spi_device to unregister
+ *
+ * Start making the passed SPI device vanish. Normally this would be handled
+ * by spi_unregister_master().
+ */
+void spi_unregister_device(struct spi_device *spi)
+{
+ if (spi)
+ device_unregister(&spi->dev);
+}
+EXPORT_SYMBOL_GPL(spi_unregister_device);
+
static void spi_match_master_to_boardinfo(struct spi_master *master,
struct spi_board_info *bi)
{