Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp638060ybe; Wed, 4 Sep 2019 05:37:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqytFl66ln2ZWhPVzkEubEfZ99CFsg2DhoXRvFS70qtCg6zKDsNBEKVMHTfI8HF3FDNOMUSx X-Received: by 2002:a63:7e17:: with SMTP id z23mr35125481pgc.14.1567600647825; Wed, 04 Sep 2019 05:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567600647; cv=none; d=google.com; s=arc-20160816; b=sZ67WOZex9zan94SJHHY3nwZ5nhRxv0hnkEI0OwpfgsitwbuYwFM4jC7Cwn65rW9pQ UQ+wCJsXZmndDl9HX5S5jWhFv0ezRLLLUJnx7WtTLZ8ggingt3gD9qiqd13tf447x50g Zat57ycdcTUm6dsfAhZQSo6RhTsFSi8GyBkvEBYdQACI8gN9O5IK3Yzrd/zoi0NTtR2W 6ciwVYKdGDPI03W1JCMeMvwrQdI7+WW61uZeVW71WppAMCz1Jf2ocz7/5O95U8BVz2CA fcGLJNORXqEkPDW/LuL5lAgnsDi4P92DmlFjzC7z5fTSFRQTCuVO/0HnvfdqhG06w3oz N/6g== 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=IX43mXHBTWaWeYO0OCzZ1dO9kYO275Fz8fcDYQKM6dw=; b=jCQf7xJweB/KihAzeqfqM+5jG0Sn+ibWD9mHu8aV2oUpK8tqb1a7MXq+4PLX1hjWnE cFzbkdx06wku2FqQCWJ4rGzRRNhn6F+B3IZtXQ9FzPpumZ4CMQRjZeaHJvxvV3JWzGCn GDFXNxUzWuYnVmveE3blgQSE+RGK2IYo61f6bzqPeZu+5RVS/OqE0NSfKCQ9rtS0NIix mJIHXVMwH06Hy+oVc/AuGAuvLFfBh7krMWRg4MhMbHrawxi0RGhzICCZr+YdZtZaNy38 9dVdK3MBzW6M5G6370eyShCrYF/YS8ISmNkiTVRqhTlOmSMN9Qmh+C4JoWTTi1y8DnPT iDRg== 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 a203si13528523pfa.82.2019.09.04.05.37.12; Wed, 04 Sep 2019 05:37:27 -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 S1730262AbfIDMev (ORCPT + 99 others); Wed, 4 Sep 2019 08:34:51 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:60544 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730197AbfIDMet (ORCPT ); Wed, 4 Sep 2019 08:34:49 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 80A6C828F4A9CBFC9278; Wed, 4 Sep 2019 20:34:47 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 20:34:40 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , Subject: [PATCH -next 09/15] thermal: rockchip: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 20:29:33 +0800 Message-ID: <20190904122939.23780-10-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/rockchip_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index 343c2f5..044e6eb 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -1219,7 +1219,6 @@ static int rockchip_thermal_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct rockchip_thermal_data *thermal; const struct of_device_id *match; - struct resource *res; int irq; int i; int error; @@ -1245,8 +1244,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev) if (!thermal->chip) return -EINVAL; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - thermal->regs = devm_ioremap_resource(&pdev->dev, res); + thermal->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(thermal->regs)) return PTR_ERR(thermal->regs); -- 2.7.4