From patchwork Tue Apr 21 07:11:03 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: 6245921 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 7C48E9F32B for ; Tue, 21 Apr 2015 07:11:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2B63203E6 for ; Tue, 21 Apr 2015 07:11:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 79008203F1 for ; Tue, 21 Apr 2015 07:11:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753035AbbDUHLM (ORCPT ); Tue, 21 Apr 2015 03:11:12 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:32896 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752926AbbDUHLI (ORCPT ); Tue, 21 Apr 2015 03:11:08 -0400 Received: by wiax7 with SMTP id x7so100163613wia.0 for ; Tue, 21 Apr 2015 00:11:06 -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=qJEXopNo1L9ru16Am6CrH+H3E9dsQBsl33MmR2UBgRg=; b=SzgU8yE03jzlLDu5p3lyq/ULmxl4qlR8ibquwc0QCOPHRbBNzBLS9XjUBVU3S+amC8 G3s9Ej2TniXFwHERxZOMQk0/zkEoeSeHO3zZRVGZcrNdl2vs2+cauj0iKslAvON9WJoy WvYq7RhwtnaFAINQjyHf1n6dunV7qDIWDjVrm83qypIyHNY+jq9kmFCLJmc7W9rOMYDi QHYjzErrOilRHy+CWAWDZDNud3djvpC+NPsJMBZocj+TsDa5N+ygXJZkdl06b8M29byu BEh/1nG2+t4toc0Ot2Wegac5iOb9DaZ+2F3JMk1Og2P3eTCmN1DDeFJFU9o1ikRzu+gU 2VNA== X-Gm-Message-State: ALoCoQk9Vbrk2jv7ggoWcL9FSyiamdVYT8KylIz7n7+TM7xpwWVNOXtC4/s9qdUlCv5KVRyrxoM+ X-Received: by 10.180.82.166 with SMTP id j6mr32384181wiy.43.1429600266791; Tue, 21 Apr 2015 00:11:06 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by mx.google.com with ESMTPSA id l3sm18332274wiv.18.2015.04.21.00.11.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Apr 2015 00:11:05 -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] Revert "usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap" Date: Tue, 21 Apr 2015 10:11:03 +0300 Message-Id: <1429600263-4366-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=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 This reverts commit 70843f623b58 ("usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap"), 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: Vivek Gautam --- 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,