diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-11-30 15:28:06 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-12-01 18:50:11 +0000 |
commit | 3b1884c24c98dada51fc4b05735773f0078711d2 (patch) | |
tree | 9a59eb143b850a0b0e7288ae62ef5a24cdd09254 /drivers/spi/spi.c | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) |
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>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index e2415be209d5..3f135cc9a70e 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -604,6 +604,20 @@ struct spi_device *spi_new_device(struct spi_master *master, } 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) { |