From patchwork Sat May 10 09:56:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 4147681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 51DE1BFF02 for ; Sat, 10 May 2014 10:00:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4EC70201DC for ; Sat, 10 May 2014 10:00:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86A75201BB for ; Sat, 10 May 2014 10:00:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wj42O-0003Nd-T4; Sat, 10 May 2014 09:57:48 +0000 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wj42I-0003K3-7j for linux-arm-kernel@lists.infradead.org; Sat, 10 May 2014 09:57:42 +0000 Received: by mail-pa0-f46.google.com with SMTP id kq14so1269234pab.5 for ; Sat, 10 May 2014 02:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=dm8ctY5VlIzXfjTk5vrVy5NvkK47i9gfAN2JKMKHF6c=; b=IJFbJMAoxJkJAoR9G8HcdA37KyL40dgjBEHmWg9HWpD5/QmVLDtR/OXDeVoInXSL2Y SWJPMpnZQcL8qhl649eJ/mkOX+E+cJVTyH35pcbBbGRUwIMbBMkI00vi2GaEKBKNTQDb f5njxfrmsTo4snsrqD4InwuyTyM0TmOTG54u8CVshXUdzF0gNhl2eaHK43n5kCQiEYf6 PZS5WX2JBb1zwe6/Iwpm7e8HfRM1vko2sL02N9jEsR+M8uYaEchUOvIP0NPipcCi6i2y 5CU/GeSw1AYGAs5fr8l6UVm0/uJfPcFGrB46WncnGTF4a9JOVg4QPrF9UHsL2JCX6ra0 +hNQ== X-Received: by 10.66.161.69 with SMTP id xq5mr10213357pab.62.1399715841136; Sat, 10 May 2014 02:57:21 -0700 (PDT) Received: from vivek-linuxpc.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id ox3sm11946297pbb.88.2014.05.10.02.57.17 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 10 May 2014 02:57:20 -0700 (PDT) From: Vivek Gautam To: linux-usb@vger.kernel.org Subject: [PATCH 2/6] usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap Date: Sat, 10 May 2014 15:26:59 +0530 Message-Id: <1399715823-19839-3-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1399715823-19839-1-git-send-email-gautam.vivek@samsung.com> References: <1399715823-19839-1-git-send-email-gautam.vivek@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140510_025742_301027_D398AAA4 X-CRM114-Status: GOOD ( 10.90 ) X-Spam-Score: 0.2 (/) Cc: linux-samsung-soc@vger.kernel.org, swarren@wwwdotorg.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, kgene.kim@samsung.com, stern@rowland.harvard.edu, Vivek Gautam , linux-tegra@vger.kernel.org, thierry.reding@gmail.com, 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Using devm_ioremap_resource() API should actually be preferred over devm_ioremap(), since the former request the mem region first and then gives back the ioremap'ed memory pointer. devm_ioremap_resource() calls request_mem_region(), therby preventing other drivers to make any overlapping call to the same region. Signed-off-by: Vivek Gautam --- drivers/usb/host/ehci-msm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index f341651..99989aa 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c @@ -96,9 +96,8 @@ static int ehci_msm_probe(struct platform_device *pdev) hcd->rsrc_start = res->start; hcd->rsrc_len = resource_size(res); - hcd->regs = devm_ioremap(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len); + hcd->regs = devm_ioremap_resource(&pdev->dev, res); if (!hcd->regs) { - dev_err(&pdev->dev, "ioremap failed\n"); ret = -ENOMEM; goto put_hcd; }