Commit c05ad0fb authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

usb: fotg210: use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230120154437.22025-5-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6df3d3aa
......@@ -135,11 +135,7 @@ static int fotg210_probe(struct platform_device *pdev)
return -ENOMEM;
fotg->dev = dev;
fotg->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!fotg->res)
return -ENODEV;
fotg->base = devm_ioremap_resource(dev, fotg->res);
fotg->base = devm_platform_get_and_ioremap_resource(pdev, 0, &fotg->res);
if (!fotg->base)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment