Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp637657ybe; Wed, 4 Sep 2019 05:37:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2Q8xrVUpiHAiOq040SHMEWvTNmBwvfydhmktbDvazWvi4a1uc6g3AgT1G3Sb/OR6Vw+RX X-Received: by 2002:a17:902:a582:: with SMTP id az2mr1140892plb.302.1567600627759; Wed, 04 Sep 2019 05:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567600627; cv=none; d=google.com; s=arc-20160816; b=VjvjnQeH6gMnGmpu8GXx1SR3WrNv8+tA6ElLxVuG/NRQmYUw4Fe9kerx/j6FlwSC1q 9StKu6YO8EsBwdfCIyTmtsQ1ad+mCJmPFKhaSABCDHn93JuZQ0EZO0yfzo5RrtgPUZuk gmZ1fEGiHoIo9k+0AsVUnSAH+nULjwuuGlOxgBHZEr4z7sXDPJXe6/A0OAL4rZ9yZIf1 OBjREjxulaQDB5/y17AG6LNHI4yO8YNMJdZyxX9eM3Zn3a5BcVoP0X1v/hGcaFePf4pI QkyAqwEGiPD3v0Xeacvf15n/eZlU8G4V1W+kklMb4MXRrAENatQdS97AWb2t7YeOMRxa FGqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=rC7FOHbHcWX3hfi8RT9nOvS2/aO3twuUYJRRwYr6W+M=; b=JcItP1bt7a45DeBXg3Ltj7WPoIr2SuoEdEtM5h+tiG/IHZwsxhh8+IoTxDR0kltTnm iaO2sjEtDFLOmGjwKu/7r5eebKPENNJ39pren6lLVJSZ71/arlJ9Sp/Jx2op74WsSdi6 W9nv4yw/bisIzMneh0a3xojGbGdEAgmM4bXqQlmAAtgmJBf3i8Z5vWTKXy89BOPwJ7Pg J4q9FGSUgDSROlOkotIdsHibAyJ1V35lsrrRW/R988aBoAAjKb7iHXZfTzKQLliCLAA0 oMsVNH6vdZo9h8vxk0vXjxTMd9TWIjadwoX4N7PxP+dMuHutT5LM6siZkgmjclJLwsnE bhsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si2140497pjr.62.2019.09.04.05.36.52; Wed, 04 Sep 2019 05:37:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730134AbfIDMeh (ORCPT + 99 others); Wed, 4 Sep 2019 08:34:37 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6645 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730101AbfIDMef (ORCPT ); Wed, 4 Sep 2019 08:34:35 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4F5D6F2F44281CFF02BF; Wed, 4 Sep 2019 20:34:32 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 20:34:24 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , Subject: [PATCH -next 03/15] thermal: brcmstb: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 20:29:27 +0800 Message-ID: <20190904122939.23780-4-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190904122939.23780-1-yuehaibing@huawei.com> References: <20190904122939.23780-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- 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