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>
This commit is contained in:
Yangtao Li 2023-07-10 21:38:28 +08:00 committed by Xu Yilun
parent e9fdc41a3d
commit c9b5ff3b9a
No known key found for this signature in database
GPG Key ID: FCB70381A4A08CDA

View File

@ -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);