Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755344Ab3CQHD6 (ORCPT ); Sun, 17 Mar 2013 03:03:58 -0400 Received: from mail-qc0-f182.google.com ([209.85.216.182]:33198 "EHLO mail-qc0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752361Ab3CQHDz (ORCPT ); Sun, 17 Mar 2013 03:03:55 -0400 From: Silviu-Mihai Popescu To: netdev@vger.kernel.org Cc: samuel@sortiz.org, linux-kernel@vger.kernel.org, Silviu-Mihai Popescu Subject: [PATCH] drivers: net: irda: use resource_size() in au1k_ir.c Date: Sun, 17 Mar 2013 09:03:46 +0200 Message-Id: <1363503826-24166-1-git-send-email-silviupopescu1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1296 Lines: 42 This uses the resource_size() function instead of explicit computation. Signed-off-by: Silviu-Mihai Popescu --- 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 #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; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/