Commit 94d8f2b1 authored by Silviu-Mihai Popescu's avatar Silviu-Mihai Popescu Committed by David S. Miller

drivers: net: irda: use resource_size() in au1k_ir.c

This uses the resource_size() function instead of explicit computation.
Signed-off-by: default avatarSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent debd0034
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/ioport.h>
#include <net/irda/irda.h> #include <net/irda/irda.h>
#include <net/irda/irmod.h> #include <net/irda/irmod.h>
...@@ -882,12 +883,12 @@ static int au1k_irda_probe(struct platform_device *pdev) ...@@ -882,12 +883,12 @@ static int au1k_irda_probe(struct platform_device *pdev)
goto out; goto out;
err = -EBUSY; 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); pdev->name);
if (!aup->ioarea) if (!aup->ioarea)
goto out; 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) if (!aup->iobase)
goto out2; goto out2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment