diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-11-30 09:28:06 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-12-01 13:50:11 -0500 |
commit | 3b1884c24c98dada51fc4b05735773f0078711d2 (patch) | |
tree | 9a59eb143b850a0b0e7288ae62ef5a24cdd09254 | |
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>
-rw-r--r-- | drivers/spi/spi.c | 14 | ||||
-rw-r--r-- | include/linux/spi/spi.h | 7 |
2 files changed, 15 insertions, 6 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, | |||
604 | } | 604 | } |
605 | EXPORT_SYMBOL_GPL(spi_new_device); | 605 | EXPORT_SYMBOL_GPL(spi_new_device); |
606 | 606 | ||
607 | /** | ||
608 | * spi_unregister_device - unregister a single SPI device | ||
609 | * @spi: spi_device to unregister | ||
610 | * | ||
611 | * Start making the passed SPI device vanish. Normally this would be handled | ||
612 | * by spi_unregister_master(). | ||
613 | */ | ||
614 | void spi_unregister_device(struct spi_device *spi) | ||
615 | { | ||
616 | if (spi) | ||
617 | device_unregister(&spi->dev); | ||
618 | } | ||
619 | EXPORT_SYMBOL_GPL(spi_unregister_device); | ||
620 | |||
607 | static void spi_match_master_to_boardinfo(struct spi_master *master, | 621 | static void spi_match_master_to_boardinfo(struct spi_master *master, |
608 | struct spi_board_info *bi) | 622 | struct spi_board_info *bi) |
609 | { | 623 | { |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index cce80e6dc7d1..075bede66521 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -1115,12 +1115,7 @@ spi_add_device(struct spi_device *spi); | |||
1115 | extern struct spi_device * | 1115 | extern struct spi_device * |
1116 | spi_new_device(struct spi_master *, struct spi_board_info *); | 1116 | spi_new_device(struct spi_master *, struct spi_board_info *); |
1117 | 1117 | ||
1118 | static inline void | 1118 | extern void spi_unregister_device(struct spi_device *spi); |
1119 | spi_unregister_device(struct spi_device *spi) | ||
1120 | { | ||
1121 | if (spi) | ||
1122 | device_unregister(&spi->dev); | ||
1123 | } | ||
1124 | 1119 | ||
1125 | extern const struct spi_device_id * | 1120 | extern const struct spi_device_id * |
1126 | spi_get_device_id(const struct spi_device *sdev); | 1121 | spi_get_device_id(const struct spi_device *sdev); |