fpga: manager: Use devm_platform_ioremap_resource()
Subsystems (2)
PATCH 1/6 fpga: manager: Use devm_platform_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does.
--- drivers/fpga/ts73xx-fpga.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/fpga/ts73xx-fpga.c +1 -3
@@ -103,7 +103,6 @@ static int ts73xx_fpga_probe(struct platform_device *pdev)struct device *kdev = &pdev->dev;struct ts73xx_fpga_priv *priv;struct fpga_manager *mgr; -struct resource *res; priv =devm_kzalloc (kdev,sizeof (*priv),GFP_KERNEL );if (!priv)
@@ -111,8 +110,7 @@ static int ts73xx_fpga_probe(struct platform_device *pdev) priv->dev = kdev; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - priv->io_base =devm_ioremap_resource (kdev, res); + priv->io_base =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (priv->io_base))return PTR_ERR (priv->io_base);
Signature · 1 line
2.20.1.7.g153144c
PATCH 2/6 fpga: manager: Use devm_platform_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does.
--- drivers/fpga/socfpga.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/fpga/socfpga.c +2 -5
@@ -545,20 +545,17 @@ static int socfpga_fpga_probe(struct platform_device *pdev)struct device *dev = &pdev->dev;struct socfpga_fpga_priv *priv;struct fpga_manager *mgr; -struct resource *res;int ret; priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL );if (!priv)return -ENOMEM ; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - priv->fpga_base_addr =devm_ioremap_resource (dev, res); + priv->fpga_base_addr =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (priv->fpga_base_addr))return PTR_ERR (priv->fpga_base_addr); - res =platform_get_resource (pdev,IORESOURCE_MEM ,1 ); - priv->fpga_data_addr =devm_ioremap_resource (dev, res); + priv->fpga_data_addr =devm_platform_ioremap_resource (pdev,1 );if (IS_ERR (priv->fpga_data_addr))return PTR_ERR (priv->fpga_data_addr);
Signature · 1 line
2.20.1.7.g153144c
PATCH 3/6 fpga: manager: Use devm_platform_ioremap_resource()
In reply to Yang LiConvert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does.
--- drivers/fpga/socfpga-a10.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/fpga/socfpga-a10.c +2 -5
@@ -471,7 +471,6 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev)struct a10_fpga_priv *priv;void __iomem *reg_base;struct fpga_manager *mgr; -struct resource *res;int ret; priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL );
@@ -479,14 +478,12 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev)return -ENOMEM ;/* 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);/* Second mmio base is for writing FPGA image data */ - res =platform_get_resource (pdev,IORESOURCE_MEM ,1 ); - priv->fpga_data_addr =devm_ioremap_resource (dev, res); + priv->fpga_data_addr =devm_platform_ioremap_resource (pdev,1 );if (IS_ERR (priv->fpga_data_addr))return PTR_ERR (priv->fpga_data_addr);
Signature · 1 line
2.20.1.7.g153144c
PATCH 4/6 fpga: dfl: Use devm_platform_ioremap_resource()
In reply to Yang LiConvert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does.
--- drivers/fpga/dfl-fme-mgr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/fpga/dfl-fme-mgr.c +1 -3
@@ -280,7 +280,6 @@ static int fme_mgr_probe(struct platform_device *pdev)struct device *dev = &pdev->dev;struct fme_mgr_priv *priv;struct fpga_manager *mgr; -struct resource *res; priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL );if (!priv)
@@ -290,8 +289,7 @@ static int fme_mgr_probe(struct platform_device *pdev) priv->ioaddr = pdata->ioaddr;if (!priv->ioaddr) { - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - priv->ioaddr =devm_ioremap_resource (dev, res); + priv->ioaddr =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (priv->ioaddr))return PTR_ERR (priv->ioaddr); }
Signature · 1 line
2.20.1.7.g153144c
PATCH 5/6 fpga: manager: Use devm_platform_ioremap_resource()
In reply to Yang LiConvert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does.
--- drivers/fpga/altera-pr-ip-core-plat.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/fpga/altera-pr-ip-core-plat.c +1 -4
@@ -15,12 +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);
Signature · 1 line
2.20.1.7.g153144c
PATCH 6/6 fpga: bridge: Use devm_platform_ioremap_resource()
In reply to Yang LiConvert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does.
--- drivers/fpga/altera-freeze-bridge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/fpga/altera-freeze-bridge.c +1 -3
@@ -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);
Signature · 1 line
2.20.1.7.g153144c