diff options
author | Jingoo Han | 2013-09-24 13:52:37 +0900 |
---|---|---|
committer | Mark Brown | 2013-09-26 11:43:09 +0100 |
commit | 7388c03bac1b4466864945233abf3ca8ba1cb061 (patch) | |
tree | 8d6071606339601975dfd5b106a4a3d5410f7950 /drivers/spi/spi-ti-qspi.c | |
parent | 716db5d64f5f9bd6600cd4f85c2986d34cd7f60e (diff) |
spi: ti-qspi: use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler,
and remove unnecessary remove().
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-ti-qspi.c')
-rw-r--r-- | drivers/spi/spi-ti-qspi.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index e12d962a289f..4e2109d9853d 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -532,7 +532,7 @@ static int ti_qspi_probe(struct platform_device *pdev) if (!of_property_read_u32(np, "spi-max-frequency", &max_freq)) qspi->spi_max_frequency = max_freq; - ret = spi_register_master(master); + ret = devm_spi_register_master(&pdev->dev, master); if (ret) goto free_master; @@ -543,22 +543,12 @@ free_master: return ret; } -static int ti_qspi_remove(struct platform_device *pdev) -{ - struct ti_qspi *qspi = platform_get_drvdata(pdev); - - spi_unregister_master(qspi->master); - - return 0; -} - static const struct dev_pm_ops ti_qspi_pm_ops = { .runtime_resume = ti_qspi_runtime_resume, }; static struct platform_driver ti_qspi_driver = { .probe = ti_qspi_probe, - .remove = ti_qspi_remove, .driver = { .name = "ti,dra7xxx-qspi", .owner = THIS_MODULE, |