diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-08-20 20:58:38 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-09-16 19:42:28 +0300 |
commit | 6774eea6d7a61616384743b218cf77f322e060d9 (patch) | |
tree | ddd78174995e2756687344f3ff8b6b68a19cd0be /drivers/spi | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) | |
download | linux-6774eea6d7a61616384743b218cf77f322e060d9.tar.xz |
spi: bcm53xx: Adjust devm usage
Remove use of spi_unregister_master in remove function as
devm_spi_register_master in probe function automatically
handles it. To be compatible with the change, use direct
return instead of goto and remove unnedded label out.
Also, remove bcm53xxspi_bcma_remove as it is now redundant.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-bcm53xx.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/spi/spi-bcm53xx.c b/drivers/spi/spi-bcm53xx.c index 1520554978a3..cc3f938f0a6b 100644 --- a/drivers/spi/spi-bcm53xx.c +++ b/drivers/spi/spi-bcm53xx.c @@ -247,28 +247,19 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core) if (err) { spi_master_put(master); bcma_set_drvdata(core, NULL); - goto out; + return err; } /* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */ spi_new_device(master, &bcm53xx_info); -out: - return err; -} - -static void bcm53xxspi_bcma_remove(struct bcma_device *core) -{ - struct bcm53xxspi *b53spi = bcma_get_drvdata(core); - - spi_unregister_master(b53spi->master); + return 0; } static struct bcma_driver bcm53xxspi_bcma_driver = { .name = KBUILD_MODNAME, .id_table = bcm53xxspi_bcma_tbl, .probe = bcm53xxspi_bcma_probe, - .remove = bcm53xxspi_bcma_remove, }; /************************************************** |