From patchwork Wed Mar 13 05:36:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2261651 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 7281D3FD8C for ; Wed, 13 Mar 2013 05:38:36 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFeMC-0006jR-MV; Wed, 13 Mar 2013 05:36:08 +0000 Received: from mail-bk0-x22b.google.com ([2a00:1450:4008:c01::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFeM9-0006iH-Ug for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2013 05:36:06 +0000 Received: by mail-bk0-f43.google.com with SMTP id jm19so250961bkc.2 for ; Tue, 12 Mar 2013 22:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=GJAbbZSUJpkVugzFmzN9w7Qi1JBGq5WdFP+tynucye0=; b=Y943UlYmUHvzZKGVfevKn/C6p1wi9sWZoc4RAJq0VhL4aNApL6QRu7gNC/btGZpVdd lecfs8MJAV1Vojb3H0FcZWtk/E0oezBvqaoqNKELliRDNYGHU56kWTbJcQOBEBSwCzZX msdChvMPSMtSJjZTnZxGMZU2pwZVLX3boqUdToCvtqmmePlrwRLuvJ4CPl83SC0DNMpk +22rA+k6UxaCHZPUuNGu6J5jA9mDTaFViOrtbv1j6wqZ16hpnG+Ota5rnQL0rO2zzYvH qxpsgeTBD8s7S1Ij3AgUTlRqAbGnJjSmbTiPUsnOFYmbuwF2i8SqjjI4IZHXYQ2bPl0H 2PAg== MIME-Version: 1.0 X-Received: by 10.205.133.1 with SMTP id hw1mr6942667bkc.58.1363152961214; Tue, 12 Mar 2013 22:36:01 -0700 (PDT) Received: by 10.204.30.210 with HTTP; Tue, 12 Mar 2013 22:36:01 -0700 (PDT) Date: Wed, 13 Mar 2013 13:36:01 +0800 Message-ID: Subject: [PATCH] mmc: vt8500: use resource_size() macro From: Wei Yongjun To: linux@prisktech.co.nz, cjb@laptop.org, grant.likely@secretlab.ca, rob.herring@calxeda.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130313_013606_146389_F1C3E950 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (weiyj.lk[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: yongjun_wei@trendmicro.com.cn, linux-mmc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Wei Yongjun Use resource_size function on resource object instead of explicit computation. Signed-off-by: Wei Yongjun --- drivers/mmc/host/wmt-sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index c6d0015..04102d2 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -925,7 +925,7 @@ static int wmt_mci_remove(struct platform_device *pdev) clk_put(priv->clk_sdmmc); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - release_mem_region(res->start, res->end - res->start + 1); + release_mem_region(res->start, resource_size(res)); mmc_free_host(mmc);