提交 bb304b71 编写于 作者: I Ivan T. Ivanov 提交者: Greg Kroah-Hartman

Revert "usb: host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap"

This reverts commit 70843f62 ("usb: host: ehci-msm: Use
devm_ioremap_resource instead of devm_ioremap") and commit
e507bf57 ("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.
Signed-off-by: NIvan T. Ivanov <ivan.ivanov@linaro.org>
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Acked-by: NVivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a5a356ce
...@@ -88,13 +88,20 @@ static int ehci_msm_probe(struct platform_device *pdev) ...@@ -88,13 +88,20 @@ static int ehci_msm_probe(struct platform_device *pdev)
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
hcd->regs = devm_ioremap_resource(&pdev->dev, res); if (!res) {
if (IS_ERR(hcd->regs)) { dev_err(&pdev->dev, "Unable to get memory resource\n");
ret = PTR_ERR(hcd->regs); ret = -ENODEV;
goto put_hcd; goto put_hcd;
} }
hcd->rsrc_start = res->start; hcd->rsrc_start = res->start;
hcd->rsrc_len = resource_size(res); 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, * OTG driver takes care of PHY initialization, clock management,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册