From patchwork Mon Apr 27 12:27:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 6279641 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 992119F2BA for ; Mon, 27 Apr 2015 12:27:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C09C120445 for ; Mon, 27 Apr 2015 12:27:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA87A2038A for ; Mon, 27 Apr 2015 12:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932423AbbD0M1m (ORCPT ); Mon, 27 Apr 2015 08:27:42 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:37509 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932325AbbD0M1l (ORCPT ); Mon, 27 Apr 2015 08:27:41 -0400 Received: by widdi4 with SMTP id di4so87815271wid.0 for ; Mon, 27 Apr 2015 05:27:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VzlOQWFNClTjjfzhMNTDvksi+RpVcvtUWCEoZvJBdwA=; b=bdIQCQiEYmhw22Y1xPd2qnHwZ1bjfdwJ4TPdgju2oVyIH2thElen0oBa2iInuK6FDl lYMLtcjJthpOCOpjX+MEq7PMGVppJar/BIvnZ1iaTncTj33ANLsxos06QkTaBQTa79D3 WuxXwTJbn8ncbDX/qIvgmFlR0QdvVXRCGRiAkr5QJHAGb8uvgzad7K+LugrJWQXXfoKk j2sn1i5amxq0Y+ZR56N1fxFLyz2Y3csTOMD7xqbw8WM9Ovk9SN9HiM4GOdaPxDjg8j1v SXNgl0eS8Us+iaoo8/HssNjo4koRfjXjZTkWHcaZiXp1hk3GrsjXZzy4Y/XXQOP1jh87 8KKw== X-Gm-Message-State: ALoCoQkPT6FVxOcqdd8f/16E0TCxQHC1lOe8O/ckY15lxRuSDO5Fg2FBQSgZBFumReA2i7ct5rok X-Received: by 10.180.7.133 with SMTP id j5mr20435302wia.84.1430137659961; Mon, 27 Apr 2015 05:27:39 -0700 (PDT) Received: from mms-0439.wifi.mm-sol.com ([37.157.136.206]) by mx.google.com with ESMTPSA id vz8sm8346761wjc.27.2015.04.27.05.27.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Apr 2015 05:27:39 -0700 (PDT) From: "Ivan T. Ivanov" To: Alan Stern Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vivek Gautam Subject: [PATCH v2] Revert "usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap" Date: Mon, 27 Apr 2015 15:27:36 +0300 Message-Id: <1430137656-4953-1-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 This reverts commit 70843f623b58 ("usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap") and commit e507bf577e5a ("host: ehci-msm: remove duplicate check on resource"), because msm_otg and this driver are using same address space to access AHB mode and USB command registers. Cc: Vivek Gautam Signed-off-by: Ivan T. Ivanov Acked-by: Alan Stern Acked-by: Vivek Gautam --- Changes since v0: * Add note to patch description that also commit e507bf577e5a is reverted. drivers/usb/host/ehci-msm.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" 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/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index 9db74ca..275c92e 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c @@ -88,13 +88,20 @@ static int ehci_msm_probe(struct platform_device *pdev) } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hcd->regs = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(hcd->regs)) { - ret = PTR_ERR(hcd->regs); + if (!res) { + dev_err(&pdev->dev, "Unable to get memory resource\n"); + ret = -ENODEV; goto put_hcd; } + hcd->rsrc_start = res->start; hcd->rsrc_len = resource_size(res); + hcd->regs = devm_ioremap(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len); + if (!hcd->regs) { + dev_err(&pdev->dev, "ioremap failed\n"); + ret = -ENOMEM; + goto put_hcd; + } /* * OTG driver takes care of PHY initialization, clock management,