[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190904122939.23780-2-yuehaibing@huawei.com>
Date: Wed, 4 Sep 2019 20:29:25 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <miquel.raynal@...tlin.com>, <rui.zhang@...el.com>,
<edubezval@...il.com>, <daniel.lezcano@...aro.org>,
<amit.kucheria@...durent.com>, <eric@...olt.net>,
<wahrenst@....net>, <f.fainelli@...il.com>, <rjui@...adcom.com>,
<sbranden@...adcom.com>, <mmayer@...adcom.com>,
<computersforpeace@...il.com>, <gregory.0xf0@...il.com>,
<matthias.bgg@...il.com>, <agross@...nel.org>, <heiko@...ech.de>,
<mcoquelin.stm32@...il.com>, <alexandre.torgue@...com>,
<marc.w.gonzalez@...e.fr>, <mans@...sr.com>, <talel@...zon.com>,
<jun.nie@...aro.org>, <shawnguo@...nel.org>,
<phil@...pberrypi.org>, <yuehaibing@...wei.com>,
<gregkh@...uxfoundation.org>, <david.hernandezsanchez@...com>,
<horms+renesas@...ge.net.au>, <wsa+renesas@...g-engineering.com>
CC: <bcm-kernel-feedback-list@...adcom.com>,
<linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-rpi-kernel@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-arm-msm@...r.kernel.org>,
<linux-rockchip@...ts.infradead.org>,
<linux-stm32@...md-mailman.stormreply.com>
Subject: [PATCH -next 01/15] thermal: armada: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
drivers/thermal/armada_thermal.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 709a22f..70fe9c6 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -708,12 +708,10 @@ static int armada_thermal_probe_legacy(struct platform_device *pdev,
struct armada_thermal_priv *priv)
{
struct armada_thermal_data *data = priv->data;
- struct resource *res;
void __iomem *base;
/* First memory region points towards the status register */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.7.4
Powered by blists - more mailing lists