soc: lantiq: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Paul 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
This commit is contained in:
Yangtao Li 2019-12-14 17:54:45 +00:00 committed by Paul Burton
parent cc43928ba4
commit 23c25c7325
No known key found for this signature in database
GPG Key ID: 3EA79FACB57500DD

View File

@ -28,14 +28,12 @@ static int ltq_fpi_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct resource *res_xbar;
struct regmap *rcu_regmap;
void __iomem *xbar_membase;
u32 rcu_ahb_endianness_reg_offset;
int ret;
res_xbar = platform_get_resource(pdev, IORESOURCE_MEM, 0);
xbar_membase = devm_ioremap_resource(dev, res_xbar);
xbar_membase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(xbar_membase))
return PTR_ERR(xbar_membase);