From: Silviu-Mihai Popescu Date: Sat, 16 Mar 2013 21:03:46 +0000 (+0000) Subject: drivers: net: irda: use resource_size() in au1k_ir.c X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=94d8f2b133c9ff97105adc1233d1a35e16e1e7a6;p=linux-beck.git 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 Signed-off-by: David S. Miller --- 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 @@ #include #include #include +#include #include #include @@ -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;