Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755432AbbDUPEG (ORCPT ); Tue, 21 Apr 2015 11:04:06 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:36565 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752671AbbDUPED (ORCPT ); Tue, 21 Apr 2015 11:04:03 -0400 Date: Tue, 21 Apr 2015 11:04:02 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "Ivan T. Ivanov" cc: Greg Kroah-Hartman , , , , Vivek Gautam Subject: Re: [PATCH] Revert "usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap" In-Reply-To: <1429600263-4366-1-git-send-email-ivan.ivanov@linaro.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1905 Lines: 60 On Tue, 21 Apr 2015, Ivan T. Ivanov wrote: > 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. Um, this patch is in fact _not_ a reversion of 70843f623b58. That commit removed 4 lines of code and added 3. If this were truly a reversion, it would remove 3 lines and add 4. Instead it adds 10. Please make this a true reversion. Alan Stern > Cc: Vivek Gautam > Signed-off-by: Ivan T. Ivanov > --- > drivers/usb/host/ehci-msm.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > 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, > -- > 1.9.1 > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/