linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: omap-100k: remove pointless _remove function
@ 2013-11-29 17:09 Michal Nazarewicz
       [not found] ` <1385744947-10283-1-git-send-email-mpn-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Nazarewicz @ 2013-11-29 17:09 UTC (permalink / raw)
  To: Mark Brown, Jingoo Han; +Cc: linux-spi, linux-kernel

From: Michal Nazarewicz <mina86@mina86.com>

Commit [8074cf06: use devm_spi_register_master()] removed the last
bit of omap1_spi100k_remove function that had side effects.  After
call to spi_unregister_master was removed, the function consisted
of:

2. call to platform_get_drvdata whose return value was only used in:
2. call to spi_master_get_devdata whose return value was not used,
3. an if statement checking if zero was not zero, and
4. call to platform_get_resource whose return value was not used.

Ah, yes, and of course, final return 0. ;)

Since omap1_spi100k_remove no longer does anything, it can be
safely removed.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
---
 drivers/spi/spi-omap-100k.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c
index b6ed82b..0d32054 100644
--- a/drivers/spi/spi-omap-100k.c
+++ b/drivers/spi/spi-omap-100k.c
@@ -470,31 +470,12 @@ err:
 	return status;
 }
 
-static int omap1_spi100k_remove(struct platform_device *pdev)
-{
-	struct spi_master       *master;
-	struct omap1_spi100k    *spi100k;
-	struct resource         *r;
-	int			status = 0;
-
-	master = platform_get_drvdata(pdev);
-	spi100k = spi_master_get_devdata(master);
-
-	if (status != 0)
-		return status;
-
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-	return 0;
-}
-
 static struct platform_driver omap1_spi100k_driver = {
 	.driver = {
 		.name		= "omap1_spi100k",
 		.owner		= THIS_MODULE,
 	},
 	.probe		= omap1_spi100k_probe,
-	.remove		= omap1_spi100k_remove,
 };
 
 module_platform_driver(omap1_spi100k_driver);
@@ -502,4 +483,3 @@ module_platform_driver(omap1_spi100k_driver);
 MODULE_DESCRIPTION("OMAP7xx SPI 100k controller driver");
 MODULE_AUTHOR("Fabrice Crohas <fcrohas@gmail.com>");
 MODULE_LICENSE("GPL");
-
-- 
1.8.4.1

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

* Re: [PATCH] spi: omap-100k: remove pointless _remove function
       [not found] ` <1385744947-10283-1-git-send-email-mpn-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
@ 2013-12-02 17:36   ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-12-02 17:36 UTC (permalink / raw)
  To: Michal Nazarewicz
  Cc: Jingoo Han, linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

On Fri, Nov 29, 2013 at 06:09:07PM +0100, Michal Nazarewicz wrote:
> From: Michal Nazarewicz <mina86-deATy8a+UHjQT0dZR+AlfA@public.gmane.org>
> 
> Commit [8074cf06: use devm_spi_register_master()] removed the last
> bit of omap1_spi100k_remove function that had side effects.  After
> call to spi_unregister_master was removed, the function consisted
> of:

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-12-02 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-29 17:09 [PATCH] spi: omap-100k: remove pointless _remove function Michal Nazarewicz
     [not found] ` <1385744947-10283-1-git-send-email-mpn-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-12-02 17:36   ` 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).