summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-falcon.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-12-04 14:11:56 +0900
committerMark Brown <broonie@linaro.org>2013-12-04 12:54:52 +0000
commit999b6e932bf7238a0d1eb35d0b3d6eac673b8777 (patch)
treea332a513612c8b03941d38da95450f2daf6881f2 /drivers/spi/spi-falcon.c
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
downloadlwn-999b6e932bf7238a0d1eb35d0b3d6eac673b8777.tar.gz
lwn-999b6e932bf7238a0d1eb35d0b3d6eac673b8777.zip
spi: falcon: 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> Acked-by: Thomas Langer <thomas.langer@lantiq.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-falcon.c')
-rw-r--r--drivers/spi/spi-falcon.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c
index c7a74f0ef892..dd5bd468e962 100644
--- a/drivers/spi/spi-falcon.c
+++ b/drivers/spi/spi-falcon.c
@@ -433,21 +433,12 @@ static int falcon_sflash_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, priv);
- ret = spi_register_master(master);
+ ret = devm_spi_register_master(&pdev->dev, master);
if (ret)
spi_master_put(master);
return ret;
}
-static int falcon_sflash_remove(struct platform_device *pdev)
-{
- struct falcon_sflash *priv = platform_get_drvdata(pdev);
-
- spi_unregister_master(priv->master);
-
- return 0;
-}
-
static const struct of_device_id falcon_sflash_match[] = {
{ .compatible = "lantiq,sflash-falcon" },
{},
@@ -456,7 +447,6 @@ MODULE_DEVICE_TABLE(of, falcon_sflash_match);
static struct platform_driver falcon_sflash_driver = {
.probe = falcon_sflash_probe,
- .remove = falcon_sflash_remove,
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,