[PATCH -next 03/15] thermal: brcmstb: use devm_platform_ioremap_resource() to simplify code

YueHaibing
2019-09-04T12:34:38Z

drivers/thermal/broadcom/brcmstb_thermal.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c
index 5825ac5..de43c3e 100644
--- a/drivers/thermal/broadcom/brcmstb_thermal.c
+++ b/drivers/thermal/broadcom/brcmstb_thermal.c
@@ -305,15 +305,13 @@ static int brcmstb_thermal_probe(struct platform_device *pdev)
{
struct thermal_zone_device *thermal;
struct brcmstb_thermal_priv *priv;
- struct resource *res;
int irq, ret;

priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->tmon_base = devm_ioremap_resource(&pdev->dev, res);
+ priv->tmon_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->tmon_base))
return PTR_ERR(priv->tmon_base);

--
2.7.4