From patchwork Wed Jun 5 09:24:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 2668141 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1337340D82 for ; Wed, 5 Jun 2013 09:24:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753570Ab3FEJYW (ORCPT ); Wed, 5 Jun 2013 05:24:22 -0400 Received: from mga14.intel.com ([143.182.124.37]:15377 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753552Ab3FEJYT (ORCPT ); Wed, 5 Jun 2013 05:24:19 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 05 Jun 2013 02:24:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,804,1363158000"; d="scan'208";a="312544018" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.173]) by azsmga001.ch.intel.com with ESMTP; 05 Jun 2013 02:24:16 -0700 Received: from andy by smile with local (Exim 4.80) (envelope-from ) id 1Uk9wz-0008Dm-1T; Wed, 05 Jun 2013 12:24:13 +0300 From: Andy Shevchenko To: Jaehoon Chung , Chris Ball , linux-mmc@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH 1/3] mmc: dw: don't check resource with devm_ioremap_resource Date: Wed, 5 Jun 2013 12:24:10 +0300 Message-Id: <1370424252-31562-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.8.2.rc0.22.gb3600c3 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Andy Shevchenko Acked-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc-pltfm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index 37873f1..526abae 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c @@ -25,7 +25,7 @@ #include "dw_mmc.h" int dw_mci_pltfm_register(struct platform_device *pdev, - const struct dw_mci_drv_data *drv_data) + const struct dw_mci_drv_data *drv_data) { struct dw_mci *host; struct resource *regs; @@ -35,10 +35,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev, if (!host) return -ENOMEM; - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!regs) - return -ENXIO; - host->irq = platform_get_irq(pdev, 0); if (host->irq < 0) return host->irq; @@ -47,6 +43,8 @@ int dw_mci_pltfm_register(struct platform_device *pdev, host->dev = &pdev->dev; host->irq_flags = 0; host->pdata = pdev->dev.platform_data; + + regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); host->regs = devm_ioremap_resource(&pdev->dev, regs); if (IS_ERR(host->regs)) return PTR_ERR(host->regs);