aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-falcon.c
diff options
context:
space:
mode:
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)
433 433
434 platform_set_drvdata(pdev, priv); 434 platform_set_drvdata(pdev, priv);
435 435
436 ret = spi_register_master(master); 436 ret = devm_spi_register_master(&pdev->dev, master);
437 if (ret) 437 if (ret)
438 spi_master_put(master); 438 spi_master_put(master);
439 return ret; 439 return ret;
440} 440}
441 441
442static int falcon_sflash_remove(struct platform_device *pdev)
443{
444 struct falcon_sflash *priv = platform_get_drvdata(pdev);
445
446 spi_unregister_master(priv->master);
447
448 return 0;
449}
450
451static const struct of_device_id falcon_sflash_match[] = { 442static const struct of_device_id falcon_sflash_match[] = {
452 { .compatible = "lantiq,sflash-falcon" }, 443 { .compatible = "lantiq,sflash-falcon" },
453 {}, 444 {},
@@ -456,7 +447,6 @@ MODULE_DEVICE_TABLE(of, falcon_sflash_match);
456 447
457static struct platform_driver falcon_sflash_driver = { 448static struct platform_driver falcon_sflash_driver = {
458 .probe = falcon_sflash_probe, 449 .probe = falcon_sflash_probe,
459 .remove = falcon_sflash_remove,
460 .driver = { 450 .driver = {
461 .name = DRV_NAME, 451 .name = DRV_NAME,
462 .owner = THIS_MODULE, 452 .owner = THIS_MODULE,