diff options
author | Silviu-Mihai Popescu <silviupopescu1990@gmail.com> | 2013-03-16 17:03:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-17 14:27:37 -0400 |
commit | 94d8f2b133c9ff97105adc1233d1a35e16e1e7a6 (patch) | |
tree | 25e28fed5b274e62e289415865d84c05314fc26b /drivers/net/irda | |
parent | debd0034de1f68585ab5d1d3d693d38f19d48e5d (diff) |
drivers: net: irda: use resource_size() in au1k_ir.c
This uses the resource_size() function instead of explicit computation.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/au1k_ir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c index b5151e4ced61..56f1e6d6e4eb 100644 --- a/drivers/net/irda/au1k_ir.c +++ b/drivers/net/irda/au1k_ir.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/time.h> | 28 | #include <linux/time.h> |
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/ioport.h> | ||
30 | 31 | ||
31 | #include <net/irda/irda.h> | 32 | #include <net/irda/irda.h> |
32 | #include <net/irda/irmod.h> | 33 | #include <net/irda/irmod.h> |
@@ -882,12 +883,12 @@ static int au1k_irda_probe(struct platform_device *pdev) | |||
882 | goto out; | 883 | goto out; |
883 | 884 | ||
884 | err = -EBUSY; | 885 | err = -EBUSY; |
885 | aup->ioarea = request_mem_region(r->start, r->end - r->start + 1, | 886 | aup->ioarea = request_mem_region(r->start, resource_size(r), |
886 | pdev->name); | 887 | pdev->name); |
887 | if (!aup->ioarea) | 888 | if (!aup->ioarea) |
888 | goto out; | 889 | goto out; |
889 | 890 | ||
890 | aup->iobase = ioremap_nocache(r->start, r->end - r->start + 1); | 891 | aup->iobase = ioremap_nocache(r->start, resource_size(r)); |
891 | if (!aup->iobase) | 892 | if (!aup->iobase) |
892 | goto out2; | 893 | goto out2; |
893 | 894 | ||