summaryrefslogtreecommitdiff
path: root/drivers/usb/fotg210
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-01-20 18:44:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-24 20:12:58 +0300
commitc05ad0fb639c10cce0a92757f9777ec48ceafef2 (patch)
treeb11465503865412c6dada907abfe84d4f9b181bb /drivers/usb/fotg210
parent6df3d3aadb6474b9cda105576d042d5d31adec0c (diff)
downloadlinux-c05ad0fb639c10cce0a92757f9777ec48ceafef2.tar.xz
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230120154437.22025-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/fotg210')
-rw-r--r--drivers/usb/fotg210/fotg210-core.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/fotg210/fotg210-core.c b/drivers/usb/fotg210/fotg210-core.c
index ce00d9407ce5..202d80adca2c 100644
--- a/drivers/usb/fotg210/fotg210-core.c
+++ b/drivers/usb/fotg210/fotg210-core.c
@@ -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;