diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-12 08:28:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-25 20:26:07 +0200 |
commit | f60129c4e79543e7340515a02135d4fb04782d56 (patch) | |
tree | 282afbd6b39235cfd86a25b1427500744e8095cc /drivers/tty/serial/sprd_serial.c | |
parent | serial: mps2-uart: Use devm_platform_get_and_ioremap_resource() (diff) | |
download | linux-f60129c4e79543e7340515a02135d4fb04782d56.tar.xz linux-f60129c4e79543e7340515a02135d4fb04782d56.zip |
serial: sprd: 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-10-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sprd_serial.c')
-rw-r--r-- | drivers/tty/serial/sprd_serial.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index 8f6fd1cd91d7..792d016c21a7 100644 --- a/drivers/tty/serial/sprd_serial.c +++ b/drivers/tty/serial/sprd_serial.c @@ -1180,8 +1180,7 @@ static int sprd_probe(struct platform_device *pdev) if (ret) return ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - up->membase = devm_ioremap_resource(&pdev->dev, res); + up->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(up->membase)) return PTR_ERR(up->membase); |