summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-12 08:28:46 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-25 20:26:06 +0200
commit0548688dfa3aeeefc28b1603fe9d004de119dd10 (patch)
tree45b51e7a0020c5a3ceaaf9f5f3b0a51ee8dbdf38
parentserial: fsl_lpuart: Use devm_platform_get_and_ioremap_resource() (diff)
downloadlinux-0548688dfa3aeeefc28b1603fe9d004de119dd10.tar.xz
linux-0548688dfa3aeeefc28b1603fe9d004de119dd10.zip
serial: vt8500: 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: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230712062853.11007-8-frank.li@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/vt8500_serial.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index 32433e9b3e5f..c5d5c2765119 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -611,10 +611,6 @@ static int vt8500_serial_probe(struct platform_device *pdev)
if (!flags)
return -EINVAL;
- mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!mmres)
- return -ENODEV;
-
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
@@ -647,7 +643,7 @@ static int vt8500_serial_probe(struct platform_device *pdev)
if (!vt8500_port)
return -ENOMEM;
- vt8500_port->uart.membase = devm_ioremap_resource(&pdev->dev, mmres);
+ vt8500_port->uart.membase = devm_platform_get_and_ioremap_resource(pdev, 0, &mmres);
if (IS_ERR(vt8500_port->uart.membase))
return PTR_ERR(vt8500_port->uart.membase);