mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
mfd: omap-usb-host: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230706113939.1178-5-frank.li@vivo.com Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
fed64817f0
commit
390a3549fc
@ -534,7 +534,6 @@ static int usbhs_omap_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct usbhs_omap_platform_data *pdata = dev_get_platdata(dev);
|
||||
struct usbhs_hcd_omap *omap;
|
||||
struct resource *res;
|
||||
int ret = 0;
|
||||
int i;
|
||||
bool need_logic_fck;
|
||||
@ -569,8 +568,7 @@ static int usbhs_omap_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
omap->uhh_base = devm_ioremap_resource(dev, res);
|
||||
omap->uhh_base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(omap->uhh_base))
|
||||
return PTR_ERR(omap->uhh_base);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user