diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-07 10:42:22 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-04 15:38:45 +0200 |
commit | 190d1f226407d4a08e193136e26c1ac967f67b9c (patch) | |
tree | c577b8457a0ec5941edec262fd9bebb8649163b3 /drivers/misc/xilinx_sdfec.c | |
parent | c6695aadca5dd469d04352eab57c7ee65f54c1fb (diff) | |
download | linux-190d1f226407d4a08e193136e26c1ac967f67b9c.tar.gz linux-190d1f226407d4a08e193136e26c1ac967f67b9c.tar.bz2 linux-190d1f226407d4a08e193136e26c1ac967f67b9c.zip |
misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20230707024224.78907-2-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/xilinx_sdfec.c')
-rw-r--r-- | drivers/misc/xilinx_sdfec.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c index 270ff4c5971a..0877c42fb8e7 100644 --- a/drivers/misc/xilinx_sdfec.c +++ b/drivers/misc/xilinx_sdfec.c @@ -1347,7 +1347,6 @@ static int xsdfec_probe(struct platform_device *pdev) { struct xsdfec_dev *xsdfec; struct device *dev; - struct resource *res; int err; bool irq_enabled = true; @@ -1363,8 +1362,7 @@ static int xsdfec_probe(struct platform_device *pdev) return err; dev = xsdfec->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - xsdfec->regs = devm_ioremap_resource(dev, res); + xsdfec->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(xsdfec->regs)) { err = PTR_ERR(xsdfec->regs); goto err_xsdfec_dev; |