linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/spi/spi-tegra114.c clean use of devm_ioremap_resource()
@ 2013-05-14 10:07 Laurent Navet
       [not found] ` <1368526032-31371-1-git-send-email-laurent.navet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Navet @ 2013-05-14 10:07 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A
  Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Laurent Navet

Check of 'r' and calls to dev_err are already done in devm_ioremap_resource,
so no need to do them twice.

Signed-off-by: Laurent Navet <laurent.navet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/spi/spi-tegra114.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c
index 598eb45..18a6592 100644
--- a/drivers/spi/spi-tegra114.c
+++ b/drivers/spi/spi-tegra114.c
@@ -1059,18 +1059,12 @@ static int tegra_spi_probe(struct platform_device *pdev)
 	spin_lock_init(&tspi->lock);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "No IO memory resource\n");
-		ret = -ENODEV;
-		goto exit_free_master;
-	}
-	tspi->phys = r->start;
 	tspi->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(tspi->base)) {
 		ret = PTR_ERR(tspi->base);
-		dev_err(&pdev->dev, "ioremap failed: err = %d\n", ret);
 		goto exit_free_master;
 	}
+	tspi->phys = r->start;
 
 	spi_irq = platform_get_irq(pdev, 0);
 	tspi->irq = spi_irq;
-- 
1.7.10.4

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

* Re: [PATCH] drivers/spi/spi-tegra114.c clean use of devm_ioremap_resource()
       [not found] ` <1368526032-31371-1-git-send-email-laurent.navet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-05-14 16:12   ` Stephen Warren
  2013-08-20 10:44   ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2013-05-14 16:12 UTC (permalink / raw)
  To: Laurent Navet
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Wolfram Sang

On 05/14/2013 04:07 AM, Laurent Navet wrote:
> Check of 'r' and calls to dev_err are already done in devm_ioremap_resource,
> so no need to do them twice.

I think this duplicates part of a much wider patch series that Wolfram
is working on; I CC'd him here.

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

* Re: [PATCH] drivers/spi/spi-tegra114.c clean use of devm_ioremap_resource()
       [not found] ` <1368526032-31371-1-git-send-email-laurent.navet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2013-05-14 16:12   ` Stephen Warren
@ 2013-08-20 10:44   ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-08-20 10:44 UTC (permalink / raw)
  To: Laurent Navet
  Cc: grant.likely-QSEj5FYQhm4dnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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

On Tue, May 14, 2013 at 12:07:12PM +0200, Laurent Navet wrote:
> Check of 'r' and calls to dev_err are already done in devm_ioremap_resource,
> so no need to do them twice.

Applied, thanks.

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

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

end of thread, other threads:[~2013-08-20 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 10:07 [PATCH] drivers/spi/spi-tegra114.c clean use of devm_ioremap_resource() Laurent Navet
     [not found] ` <1368526032-31371-1-git-send-email-laurent.navet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-05-14 16:12   ` Stephen Warren
2013-08-20 10:44   ` 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).