From patchwork Wed Mar 13 05:35:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2261621 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4EF9ADF215 for ; Wed, 13 Mar 2013 05:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187Ab3CMFfn (ORCPT ); Wed, 13 Mar 2013 01:35:43 -0400 Received: from mail-bk0-f54.google.com ([209.85.214.54]:43980 "EHLO mail-bk0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932Ab3CMFfn (ORCPT ); Wed, 13 Mar 2013 01:35:43 -0400 Received: by mail-bk0-f54.google.com with SMTP id w5so254595bku.27 for ; Tue, 12 Mar 2013 22:35:41 -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=mQdataDlTJZPJ1djExZyvbrg3bpUizaIEvqjVnWY4nY=; b=QzTYiitChDh17yCyFytp0s5laMliMvVRuIjpwA4TXuw4ONkDPUMn0WvULHaED1XbVp bgI6K+qZoEMvBBKeJRjXwaYOYeG4nbwpPre+2KPZy9XZR87h5t6EVL3Qj657hRNtxEaE lUF4+HzFAH91ZlmaJO4O4qUYx8QxHNNZo3IpI53R8/28AkZkHVUZszOb3inHYDuRE9oR th72Dy/L/nr4tZa0Xq2FHRernOwY4CQWuIMkCU1Qr+uH7t2y1ny39yHDTK2TwzvgyQuQ 5ESqq1eTiR+EEEazDDrtExfY4LlVVpLxznObT3JOID0zExfika6P/Gun/IT3iJLiOPX5 vwQA== MIME-Version: 1.0 X-Received: by 10.205.33.3 with SMTP id sm3mr6966778bkb.64.1363152941515; Tue, 12 Mar 2013 22:35:41 -0700 (PDT) Received: by 10.204.30.210 with HTTP; Tue, 12 Mar 2013 22:35:41 -0700 (PDT) Date: Wed, 13 Mar 2013 13:35:41 +0800 Message-ID: Subject: [PATCH] mmc: goldfish: use resource_size() macro From: Wei Yongjun To: cjb@laptop.org, yunhong.jiang@intel.com, sheng@linux.intel.com, mikechan@google.com, xiaohui.xin@intel.com, jun.nakajima@intel.com Cc: yongjun_wei@trendmicro.com.cn, linux-mmc@vger.kernel.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Wei Yongjun Use resource_size function on resource object instead of explicit computation. Signed-off-by: Wei Yongjun --- drivers/mmc/host/android-goldfish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/android-goldfish.c b/drivers/mmc/host/android-goldfish.c index ef3aef0..7780c14 100644 --- a/drivers/mmc/host/android-goldfish.c +++ b/drivers/mmc/host/android-goldfish.c @@ -476,7 +476,7 @@ static int goldfish_mmc_probe(struct platform_device *pdev) host->mmc = mmc; pr_err("mmc: Mapping %lX to %lX\n", (long)res->start, (long)res->end); - host->reg_base = ioremap(res->start, res->end - res->start + 1); + host->reg_base = ioremap(res->start, resource_size(res)); if (host->reg_base == NULL) { ret = -ENOMEM; goto ioremap_failed;