diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2013-11-29 12:09:07 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-02 12:35:54 -0500 |
commit | 84acfd4340f9c7cef7286eb9d539e78fb3a15292 (patch) | |
tree | 45bb2798710b22b79021f9def054615db3fb10d7 /drivers/spi | |
parent | 0079aae0f1e6179d85323b22b370a9cc15c89d45 (diff) |
spi: omap-100k: remove pointless _remove function
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-omap-100k.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index b6ed82beb01d..0d32054bfc0d 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c | |||
@@ -470,31 +470,12 @@ err: | |||
470 | return status; | 470 | return status; |
471 | } | 471 | } |
472 | 472 | ||
473 | static int omap1_spi100k_remove(struct platform_device *pdev) | ||
474 | { | ||
475 | struct spi_master *master; | ||
476 | struct omap1_spi100k *spi100k; | ||
477 | struct resource *r; | ||
478 | int status = 0; | ||
479 | |||
480 | master = platform_get_drvdata(pdev); | ||
481 | spi100k = spi_master_get_devdata(master); | ||
482 | |||
483 | if (status != 0) | ||
484 | return status; | ||
485 | |||
486 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
487 | |||
488 | return 0; | ||
489 | } | ||
490 | |||
491 | static struct platform_driver omap1_spi100k_driver = { | 473 | static struct platform_driver omap1_spi100k_driver = { |
492 | .driver = { | 474 | .driver = { |
493 | .name = "omap1_spi100k", | 475 | .name = "omap1_spi100k", |
494 | .owner = THIS_MODULE, | 476 | .owner = THIS_MODULE, |
495 | }, | 477 | }, |
496 | .probe = omap1_spi100k_probe, | 478 | .probe = omap1_spi100k_probe, |
497 | .remove = omap1_spi100k_remove, | ||
498 | }; | 479 | }; |
499 | 480 | ||
500 | module_platform_driver(omap1_spi100k_driver); | 481 | module_platform_driver(omap1_spi100k_driver); |
@@ -502,4 +483,3 @@ module_platform_driver(omap1_spi100k_driver); | |||
502 | MODULE_DESCRIPTION("OMAP7xx SPI 100k controller driver"); | 483 | MODULE_DESCRIPTION("OMAP7xx SPI 100k controller driver"); |
503 | MODULE_AUTHOR("Fabrice Crohas <fcrohas@gmail.com>"); | 484 | MODULE_AUTHOR("Fabrice Crohas <fcrohas@gmail.com>"); |
504 | MODULE_LICENSE("GPL"); | 485 | MODULE_LICENSE("GPL"); |
505 | |||