Skip to content

Commit

Permalink
fpga: fpga-mgr: altera-pr-ip: Convert to devm_platform_ioremap_resour…
Browse files Browse the repository at this point in the history
…ce()

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>
  • Loading branch information
Yangtao Li authored and Xu Yilun committed Jul 15, 2023
1 parent e9fdc41 commit c9b5ff3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/fpga/altera-pr-ip-core-plat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c9b5ff3

Please sign in to comment.