diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-07 04:42:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-04 15:38:45 +0200 |
commit | c6695aadca5dd469d04352eab57c7ee65f54c1fb (patch) | |
tree | 2fbf307a2288b79a6e3e4be694cb2c217418b8ea /drivers/misc/atmel-ssc.c | |
parent | misc: microchip: pci1xxxx: Add support to read and write into PCI1XXXX EEPROM... (diff) | |
download | linux-c6695aadca5dd469d04352eab57c7ee65f54c1fb.tar.xz linux-c6695aadca5dd469d04352eab57c7ee65f54c1fb.zip |
misc: atmel-ssc: 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/20230707024224.78907-1-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/misc/atmel-ssc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index 7f9f562d6433..ee590c4a1537 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c @@ -212,8 +212,7 @@ static int ssc_probe(struct platform_device *pdev) of_property_read_bool(np, "atmel,clk-from-rk-pin"); } - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ssc->regs = devm_ioremap_resource(&pdev->dev, regs); + ssc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, ®s); if (IS_ERR(ssc->regs)) return PTR_ERR(ssc->regs); |