mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 18:43:33 -05:00
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>
This commit is contained in:
parent
9d4ee5bd82
commit
2d30e408a2
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue