summaryrefslogtreecommitdiff
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-07-22 15:51:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 16:49:38 +0200
commit2d30e408a2a6b3443d3232593e3d472584a3e9f8 (patch)
tree06d85520a6d24754b64bc7a5a82ba95c635024e7 /drivers/usb/musb
parent9d4ee5bd8298a2a8c2487c4d4a105fe9ddef1d81 (diff)
usb: musb: convert to devm_platform_ioremap_resource_byname
Use devm_platform_ioremap_resource_byname() to simplify code Cc: Bin Liu <b-liu@ti.com> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1595404275-8449-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/musb_dsps.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 71660491557f..19556c1a8ae8 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -429,12 +429,10 @@ static int dsps_musb_init(struct musb *musb)
struct platform_device *parent = to_platform_device(dev->parent);
const struct dsps_musb_wrapper *wrp = glue->wrp;
void __iomem *reg_base;
- struct resource *r;
u32 rev, val;
int ret;
- r = platform_get_resource_byname(parent, IORESOURCE_MEM, "control");
- reg_base = devm_ioremap_resource(dev, r);
+ reg_base = devm_platform_ioremap_resource_byname(parent, "control");
if (IS_ERR(reg_base))
return PTR_ERR(reg_base);
musb->ctrl_base = reg_base;