mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 17:32:32 +00:00
usb: musb: convert to devm_platform_ioremap_resource_byname
Use devm_platform_ioremap_resource_byname() to simplify code Cc: Bin Liu <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9d4ee5bd82
commit
2d30e408a2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user