summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-05 12:46:48 +0300
committerXu Yilun <yilun.xu@intel.com>2023-07-10 11:41:20 +0300
commit918e6224cd17ceb39c6d10b62039ab8292d469c0 (patch)
treea7c122b67a18dfe87ccaac51718d742ac31188bb
parent8e665c9c1affcbdaf573d758e8556f79c1f38fee (diff)
downloadlinux-918e6224cd17ceb39c6d10b62039ab8292d469c0.tar.xz
fpga: bridge: 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/20230705094655.44753-1-frank.li@vivo.com Signed-off-by: Xu Yilun <yilun.xu@intel.com>
-rw-r--r--drivers/fpga/altera-freeze-bridge.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/fpga/altera-freeze-bridge.c b/drivers/fpga/altera-freeze-bridge.c
index 445f4b011167..bb6b02ec2d21 100644
--- a/drivers/fpga/altera-freeze-bridge.c
+++ b/drivers/fpga/altera-freeze-bridge.c
@@ -213,14 +213,12 @@ static int altera_freeze_br_probe(struct platform_device *pdev)
void __iomem *base_addr;
struct altera_freeze_br_data *priv;
struct fpga_bridge *br;
- struct resource *res;
u32 status, revision;
if (!np)
return -ENODEV;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base_addr = devm_ioremap_resource(dev, res);
+ base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base_addr))
return PTR_ERR(base_addr);