summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-07-22 15:51:10 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 16:49:37 +0200
commit6ce7b97cfae2264687b29ae84f63fa3b57282f29 (patch)
tree058bb99928c712e19ea9b98748d3b614b787b006 /drivers/usb/phy
parent5ad91812ea4b86f8740cfa433465825fdefa554e (diff)
downloadlinux-6ce7b97cfae2264687b29ae84f63fa3b57282f29.tar.bz2
usb: phy: am335x: convert to devm_platform_ioremap_resource_byname
Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1595404275-8449-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r--drivers/usb/phy/phy-am335x-control.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c
index d16dfc320faa..97e6603c7149 100644
--- a/drivers/usb/phy/phy-am335x-control.c
+++ b/drivers/usb/phy/phy-am335x-control.c
@@ -149,7 +149,6 @@ EXPORT_SYMBOL_GPL(am335x_get_phy_control);
static int am335x_control_usb_probe(struct platform_device *pdev)
{
- struct resource *res;
struct am335x_control_usb *ctrl_usb;
const struct of_device_id *of_id;
const struct phy_control *phy_ctrl;
@@ -166,13 +165,11 @@ static int am335x_control_usb_probe(struct platform_device *pdev)
ctrl_usb->dev = &pdev->dev;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy_ctrl");
- ctrl_usb->phy_reg = devm_ioremap_resource(&pdev->dev, res);
+ ctrl_usb->phy_reg = devm_platform_ioremap_resource_byname(pdev, "phy_ctrl");
if (IS_ERR(ctrl_usb->phy_reg))
return PTR_ERR(ctrl_usb->phy_reg);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "wakeup");
- ctrl_usb->wkup = devm_ioremap_resource(&pdev->dev, res);
+ ctrl_usb->wkup = devm_platform_ioremap_resource_byname(pdev, "wakeup");
if (IS_ERR(ctrl_usb->wkup))
return PTR_ERR(ctrl_usb->wkup);