diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-31 13:50:52 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-16 19:59:36 -0400 |
commit | 666d5b4c742ba666eb68b467d777b7862f362ae5 (patch) | |
tree | efb1a0d621991a55effac8cc4f61f669542308e2 /include/linux/spi | |
parent | 272b98c6455f00884f0350f775c5342358ebb73f (diff) |
spi: core: Add devm_spi_register_master()
Help simplify the cleanup code for SPI master drivers by providing a
managed master registration function, ensuring that the master is
automatically unregistered whenever the device is unbound.
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux/spi')
-rw-r--r-- | include/linux/spi/spi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 887116dbce2c..4d634d66ba0b 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -434,6 +434,8 @@ extern struct spi_master * | |||
434 | spi_alloc_master(struct device *host, unsigned size); | 434 | spi_alloc_master(struct device *host, unsigned size); |
435 | 435 | ||
436 | extern int spi_register_master(struct spi_master *master); | 436 | extern int spi_register_master(struct spi_master *master); |
437 | extern int devm_spi_register_master(struct device *dev, | ||
438 | struct spi_master *master); | ||
437 | extern void spi_unregister_master(struct spi_master *master); | 439 | extern void spi_unregister_master(struct spi_master *master); |
438 | 440 | ||
439 | extern struct spi_master *spi_busnum_to_master(u16 busnum); | 441 | extern struct spi_master *spi_busnum_to_master(u16 busnum); |