netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: net: irda: use resource_size() in au1k_ir.c
@ 2013-03-17  7:03 Silviu-Mihai Popescu
  2013-03-17 18:28 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Silviu-Mihai Popescu @ 2013-03-17  7:03 UTC (permalink / raw)
  To: netdev; +Cc: samuel, linux-kernel, Silviu-Mihai Popescu

This uses the resource_size() function instead of explicit computation.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
 drivers/net/irda/au1k_ir.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index b5151e4..56f1e6d 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -27,6 +27,7 @@
 #include <linux/slab.h>
 #include <linux/time.h>
 #include <linux/types.h>
+#include <linux/ioport.h>
 
 #include <net/irda/irda.h>
 #include <net/irda/irmod.h>
@@ -882,12 +883,12 @@ static int au1k_irda_probe(struct platform_device *pdev)
 		goto out;
 
 	err = -EBUSY;
-	aup->ioarea = request_mem_region(r->start, r->end - r->start + 1,
+	aup->ioarea = request_mem_region(r->start, resource_size(r),
 					 pdev->name);
 	if (!aup->ioarea)
 		goto out;
 
-	aup->iobase = ioremap_nocache(r->start, r->end - r->start + 1);
+	aup->iobase = ioremap_nocache(r->start, resource_size(r));
 	if (!aup->iobase)
 		goto out2;
 
-- 
1.7.9.5

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

* Re: [PATCH] drivers: net: irda: use resource_size() in au1k_ir.c
  2013-03-17  7:03 [PATCH] drivers: net: irda: use resource_size() in au1k_ir.c Silviu-Mihai Popescu
@ 2013-03-17 18:28 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-03-17 18:28 UTC (permalink / raw)
  To: silviupopescu1990; +Cc: netdev, samuel, linux-kernel

From: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Date: Sun, 17 Mar 2013 09:03:46 +0200

> This uses the resource_size() function instead of explicit computation.
> 
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>

Applied.

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

end of thread, other threads:[~2013-03-17 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-17  7:03 [PATCH] drivers: net: irda: use resource_size() in au1k_ir.c Silviu-Mihai Popescu
2013-03-17 18:28 ` David Miller

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).