Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp636542ybe; Wed, 4 Sep 2019 05:36:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyovUcEMBEZ0k2lC51nnV2I1l3iV0vJpvgTXSMRZHEjKwO41dbSUhzCCVRO9iBO5s0RLI84 X-Received: by 2002:a17:90a:b38a:: with SMTP id e10mr4788242pjr.91.1567600567634; Wed, 04 Sep 2019 05:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567600567; cv=none; d=google.com; s=arc-20160816; b=Qh7eLhGVJQMyrCxSmevaq/TJf92jFy2MlFjx+FS+qfl1PmEBRs/oFNErCY16/fiQgV 6+AksNu5Y08/vTan8q6A9X96ey+ED2nRs73w/Daj++KHaSt4pJuC/dF3/2AvWVQ5rtJZ KiU47+5m1f0wKMdtrRfLVBQMT3JgqsL5+7SH8ZqZDNLbuN96bPYMhBdCa7+jp87u5b1+ b+ggsuyElpB/ie8TBmge75i05SoVbeuienmkUAkypuOV5fV4nnsdlmI0s1Tcjewjupyr oIBiYXEIT9FtTAEpvBoqvyk4ihVcsJKQ1nSUEO2/T2qscl3F6emaHVVQdQAVQqqGjRJD prFw== 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=iGp5YO+IXHVwk4fwsKlYLR+N63Sxqu57lMaIOj5CM8s=; b=Gz54FL+e8ItJNIXMPC3q4tl3ieUnJFtN5Sh1aW1vquWK1emcaNO536PmpVoAfzPo6Y MIQiM7NU54jcUyiY+bgXvrA78fQBW+R3SPmU5UDwWurQU0tZEQ0+9Q01gFx8usYWf+vS MIrgyFDZikKNkldFwYNOFarGy8jJ700iaZMcSC1xByzCYAi74kc0xVqcEy1yuTWSmDn3 sAODF/3sfZhSNv+dugvt6EXEm3UgMAMUlUHsEjYqO9buAJit8Bj6+SrXKGIq1MjtuJZ3 2JQc2j6gYgQUTkaTWXMEtGip5wxuY313ndjyAz5eSMzHi0vFrklkK4APoWVcde4y1jOY TjZg== 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 r1si3908562pls.323.2019.09.04.05.35.51; Wed, 04 Sep 2019 05:36: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 S1730204AbfIDMeq (ORCPT + 99 others); Wed, 4 Sep 2019 08:34:46 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6646 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730156AbfIDMep (ORCPT ); Wed, 4 Sep 2019 08:34:45 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 2319A2F04A125DBFABEF; Wed, 4 Sep 2019 20:34:41 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 20:34:33 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , Subject: [PATCH -next 06/15] thermal: mtk: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 20:29:30 +0800 Message-ID: <20190904122939.23780-7-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/mtk_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c index acf4854..da36271 100644 --- a/drivers/thermal/mtk_thermal.c +++ b/drivers/thermal/mtk_thermal.c @@ -867,7 +867,6 @@ static int mtk_thermal_probe(struct platform_device *pdev) int ret, i, ctrl_id; struct device_node *auxadc, *apmixedsys, *np = pdev->dev.of_node; struct mtk_thermal *mt; - struct resource *res; u64 auxadc_phys_base, apmixed_phys_base; struct thermal_zone_device *tzdev; @@ -885,8 +884,7 @@ static int mtk_thermal_probe(struct platform_device *pdev) if (IS_ERR(mt->clk_auxadc)) return PTR_ERR(mt->clk_auxadc); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mt->thermal_base = devm_ioremap_resource(&pdev->dev, res); + mt->thermal_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mt->thermal_base)) return PTR_ERR(mt->thermal_base); -- 2.7.4