[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1595404275-8449-7-git-send-email-chunfeng.yun@mediatek.com>
Date: Wed, 22 Jul 2020 15:51:15 +0800
From: Chunfeng Yun <chunfeng.yun@...iatek.com>
To: Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Matthias Brugger <matthias.bgg@...il.com>,
Chunfeng Yun <chunfeng.yun@...iatek.com>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>, Bin Liu <b-liu@...com>
Subject: [PATCH 7/7] usb: musb: convert to devm_platform_ioremap_resource_byname
Use devm_platform_ioremap_resource_byname() to simplify code
Cc: Bin Liu <b-liu@...com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@...iatek.com>
---
drivers/usb/musb/musb_dsps.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 8892317..9dbf977 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;
--
1.9.1
Powered by blists - more mailing lists