summaryrefslogtreecommitdiffstats
path: root/drivers/misc/xilinx_sdfec.c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-07 10:42:22 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-04 15:38:45 +0200
commit190d1f226407d4a08e193136e26c1ac967f67b9c (patch)
treec577b8457a0ec5941edec262fd9bebb8649163b3 /drivers/misc/xilinx_sdfec.c
parentc6695aadca5dd469d04352eab57c7ee65f54c1fb (diff)
downloadlinux-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.c4
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;