Commit 2ea7b148 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

usb: phy: msm: fix bug in probe()

My previous patch introduced a bug which prevented this driver from
loading.  devm_ioremap_resource() has a call to
devm_request_mem_region() which will fail because the address space is
shared between this PHY driver and CI device controller driver.

Fixes: 10f0577a ('usb: phy: msm: change devm_ioremap() to devm_ioremap_resource()')
Reported-by: default avatar"Ivan T. Ivanov" <iivanov@mm-sol.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 10775eb1
...@@ -1586,9 +1586,11 @@ static int msm_otg_probe(struct platform_device *pdev) ...@@ -1586,9 +1586,11 @@ static int msm_otg_probe(struct platform_device *pdev)
np ? "alt_core" : "usb_hs_core_clk"); np ? "alt_core" : "usb_hs_core_clk");
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
motg->regs = devm_ioremap_resource(&pdev->dev, res); if (!res)
if (IS_ERR(motg->regs)) return -EINVAL;
return PTR_ERR(motg->regs); motg->regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
if (!motg->regs)
return -ENOMEM;
/* /*
* NOTE: The PHYs can be multiplexed between the chipidea controller * NOTE: The PHYs can be multiplexed between the chipidea controller
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment