diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-12 14:28:49 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-25 20:26:07 +0200 |
commit | 0851efaf334e78e46a7000860659d7c8f5710820 (patch) | |
tree | 23892007c58b3b203e030a1ec74783b5dec0af05 /drivers/tty | |
parent | f60129c4e79543e7340515a02135d4fb04782d56 (diff) | |
download | linux-stable-0851efaf334e78e46a7000860659d7c8f5710820.tar.gz linux-stable-0851efaf334e78e46a7000860659d7c8f5710820.tar.bz2 linux-stable-0851efaf334e78e46a7000860659d7c8f5710820.zip |
serial: sccnxp: 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-11-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/sccnxp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index 31ee46eba580..2be2c1098025 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -879,14 +879,14 @@ MODULE_DEVICE_TABLE(platform, sccnxp_id_table); static int sccnxp_probe(struct platform_device *pdev) { - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct sccnxp_pdata *pdata = dev_get_platdata(&pdev->dev); + struct resource *res; int i, ret, uartclk; struct sccnxp_port *s; void __iomem *membase; struct clk *clk; - membase = devm_ioremap_resource(&pdev->dev, res); + membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(membase)) return PTR_ERR(membase); |