linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] spi: mips-lantiq: Use devm_spi_register_master()
@ 2013-12-04  5:11 Jingoo Han
       [not found] ` <002d01cef0af$5a21f140$0e65d3c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Jingoo Han @ 2013-12-04  5:11 UTC (permalink / raw)
  To: 'Mark Brown'
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, 'Jingoo Han',
	'Thomas Langer', 'John Crispin'

Use devm_spi_register_master() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 drivers/spi/spi-falcon.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c
index c7a74f0..dd5bd46 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,
-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-12-09 18:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-04  5:11 [PATCH 1/4] spi: mips-lantiq: Use devm_spi_register_master() Jingoo Han
     [not found] ` <002d01cef0af$5a21f140$0e65d3c0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04  5:13   ` [PATCH 2/4] spi: rcar: " Jingoo Han
     [not found]     ` <002e01cef0af$9e0a6ef0$da1f4cd0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-09 18:00       ` Mark Brown
2013-12-04  5:14   ` [PATCH 3/4] spi: sc18is602: " Jingoo Han
     [not found]     ` <002f01cef0af$b618e170$224aa450$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04  6:03       ` Guenter Roeck
2013-12-04 12:54       ` Mark Brown
2013-12-04  5:15   ` [PATCH 4/4] spi: spi-xcomm: " Jingoo Han
     [not found]     ` <003001cef0af$d5c84ce0$8158e6a0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-12-04 11:42       ` Lars-Peter Clausen
2013-12-04 12:52       ` Mark Brown
2013-12-04 12:23   ` [PATCH 1/4] spi: mips-lantiq: " thomas.langer-th3ZBGNqt+7QT0dZR+AlfA
2013-12-04 12:55   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).