From patchwork Fri Aug 27 20:46:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 138541 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o7RKl4bq014999 for ; Fri, 27 Aug 2010 20:47:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752120Ab0H0UrA (ORCPT ); Fri, 27 Aug 2010 16:47:00 -0400 Received: from void.printf.net ([89.145.121.20]:58432 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964Ab0H0UrA (ORCPT ); Fri, 27 Aug 2010 16:47:00 -0400 Received: from pullcord.laptop.org ([18.85.46.20]) by void.printf.net with esmtp (Exim 4.69) (envelope-from ) id 1Op5pD-0007Bi-2b; Fri, 27 Aug 2010 21:46:59 +0100 From: Chris Ball To: Andrew Morton Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org Subject: omap.c: use resource_size() Date: Fri, 27 Aug 2010 16:46:48 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index d98ddcf..23ce2f1 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1416,7 +1416,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev) if (res == NULL || irq < 0) return -ENXIO; - res = request_mem_region(res->start, res->end - res->start + 1, + res = request_mem_region(res->start, resource_size(res), pdev->name); if (res == NULL) return -EBUSY; @@ -1456,7 +1456,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev) host->irq = irq; host->phys_base = host->mem_res->start; - host->virt_base = ioremap(res->start, res->end - res->start + 1); + host->virt_base = ioremap(res->start, resource_size(res)); if (!host->virt_base) goto err_ioremap; @@ -1513,7 +1513,7 @@ err_free_mmc_host: err_ioremap: kfree(host); err_free_mem_region: - release_mem_region(res->start, res->end - res->start + 1); + release_mem_region(res->start, resource_size(res)); return ret; }