summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-10 21:38:28 +0800
committerXu Yilun <yilun.xu@intel.com>2023-07-15 22:46:31 +0800
commitc9b5ff3b9a288ba9fc033de8573c50a5ecaeeeef (patch)
tree90e239e2cd662775bd1766ef7d343be332f6e7fb
parente9fdc41a3d66c7602b524a248d3b4ec7c430cb92 (diff)
downloadlinux-stable-c9b5ff3b9a288ba9fc033de8573c50a5ecaeeeef.tar.gz
linux-stable-c9b5ff3b9a288ba9fc033de8573c50a5ecaeeeef.tar.bz2
linux-stable-c9b5ff3b9a288ba9fc033de8573c50a5ecaeeeef.zip
fpga: fpga-mgr: altera-pr-ip: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Acked-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20230710133830.65631-1-frank.li@vivo.com Signed-off-by: Xu Yilun <yilun.xu@intel.com>
-rw-r--r--drivers/fpga/altera-pr-ip-core-plat.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/fpga/altera-pr-ip-core-plat.c b/drivers/fpga/altera-pr-ip-core-plat.c
index b008a6b8d2d3..06c6a4721205 100644
--- a/drivers/fpga/altera-pr-ip-core-plat.c
+++ b/drivers/fpga/altera-pr-ip-core-plat.c
@@ -15,13 +15,9 @@ static int alt_pr_platform_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
void __iomem *reg_base;
- struct resource *res;
/* First mmio base is for register access */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
- reg_base = devm_ioremap_resource(dev, res);
-
+ reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(reg_base))
return PTR_ERR(reg_base);