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>
This commit is contained in:
parent
6ff33f3902
commit
6774eea6d7
@ -247,28 +247,19 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core)
|
|||||||
if (err) {
|
if (err) {
|
||||||
spi_master_put(master);
|
spi_master_put(master);
|
||||||
bcma_set_drvdata(core, NULL);
|
bcma_set_drvdata(core, NULL);
|
||||||
goto out;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */
|
/* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */
|
||||||
spi_new_device(master, &bcm53xx_info);
|
spi_new_device(master, &bcm53xx_info);
|
||||||
|
|
||||||
out:
|
return 0;
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void bcm53xxspi_bcma_remove(struct bcma_device *core)
|
|
||||||
{
|
|
||||||
struct bcm53xxspi *b53spi = bcma_get_drvdata(core);
|
|
||||||
|
|
||||||
spi_unregister_master(b53spi->master);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct bcma_driver bcm53xxspi_bcma_driver = {
|
static struct bcma_driver bcm53xxspi_bcma_driver = {
|
||||||
.name = KBUILD_MODNAME,
|
.name = KBUILD_MODNAME,
|
||||||
.id_table = bcm53xxspi_bcma_tbl,
|
.id_table = bcm53xxspi_bcma_tbl,
|
||||||
.probe = bcm53xxspi_bcma_probe,
|
.probe = bcm53xxspi_bcma_probe,
|
||||||
.remove = bcm53xxspi_bcma_remove,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user