Commit 23c25c73 authored by Yangtao Li's avatar Yangtao Li Committed by Paul Burton

soc: lantiq: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarPaul Burton <paulburton@kernel.org>
Cc: khilman@baylibre.com
Cc: leoyang.li@nxp.com
Cc: khalasa@piap.pl
Cc: john@phrozen.org
Cc: matthias.bgg@gmail.com
Cc: agross@kernel.org
Cc: bjorn.andersson@linaro.org
Cc: kgene@kernel.org
Cc: krzk@kernel.org
Cc: mripard@kernel.org
Cc: wens@csie.org
Cc: ssantosh@kernel.org
Cc: jun.nie@linaro.org
Cc: shawnguo@kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-mips@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
parent cc43928b
...@@ -28,14 +28,12 @@ static int ltq_fpi_probe(struct platform_device *pdev) ...@@ -28,14 +28,12 @@ static int ltq_fpi_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
struct resource *res_xbar;
struct regmap *rcu_regmap; struct regmap *rcu_regmap;
void __iomem *xbar_membase; void __iomem *xbar_membase;
u32 rcu_ahb_endianness_reg_offset; u32 rcu_ahb_endianness_reg_offset;
int ret; int ret;
res_xbar = platform_get_resource(pdev, IORESOURCE_MEM, 0); xbar_membase = devm_platform_ioremap_resource(pdev, 0);
xbar_membase = devm_ioremap_resource(dev, res_xbar);
if (IS_ERR(xbar_membase)) if (IS_ERR(xbar_membase))
return PTR_ERR(xbar_membase); return PTR_ERR(xbar_membase);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment