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: 4147651 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 B609FBFF02 for ; Sat, 10 May 2014 09:58:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E0E6E201D3 for ; Sat, 10 May 2014 09:58:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15A41201BB for ; Sat, 10 May 2014 09:58:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756615AbaEJJ5Y (ORCPT ); Sat, 10 May 2014 05:57:24 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:65428 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752845AbaEJJ5W (ORCPT ); Sat, 10 May 2014 05:57:22 -0400 Received: by mail-pa0-f48.google.com with SMTP id rd3so5387848pab.21 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 Cc: linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org, stern@rowland.harvard.edu, swarren@wwwdotorg.org, kgene.kim@samsung.com, thierry.reding@gmail.com, Vivek Gautam 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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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; }