Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp636607ybe; Wed, 4 Sep 2019 05:36:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/N5OWzPAU9hefKJiTCCgRiDkn1uJzIIXRiji4CJBgoiXhKBLhnvTI4CPk92Uw3jF1uXra X-Received: by 2002:a17:90b:f03:: with SMTP id br3mr4745056pjb.67.1567600570560; Wed, 04 Sep 2019 05:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567600570; cv=none; d=google.com; s=arc-20160816; b=00oAM3ni12aUYIPfKJhwjhgGMmg++NjXnw/vdyxsAmuZ2L6FZjDew+O3vAfGp3UsxX ePfJVuMSLTkQ5qRSffuMdL4mvQCYixtWuwxFjOzaz9UB/UmQTl5lQu+DY7AtC9t3SLiW WxIqmVHC3y/dvMALdhYBP38sh4yP/ebeOFSTsS5dRO+DaN6uWd4ctN0P314N1OgUGtr2 6SUBzTnzQHBx55e2F/Aq+rJXMi7oSchzzQytAdIxTmP6DoRX7oKbApzm2oAAOf5hcDBH DiZcV4yC+klCHt8tB97ZyX7Xw1oEaxK9Ouv6Ky6rVJwPIHXqsHdqZ77ZAmPF8YvQsVyh fj4A== 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=tykeF/mwYG7QRm1e4TtgoBdoKMj01F947iq2Wv4Dwl4=; b=G5n40pzcD2IbuOM09V6hvOdohynmSdjxQrvOdmKm4HGffI+dIUEeM2eKNssbxVok8X YFrAs3uKjiLkpwOmldZW1ieUIa4G8FrE0olBKpbpEeC5y0z6EbOALm66ydaOReoveSyi zCyLUOrgApjVONq1ugXSW6M92cpg54CjySjqpZyXiLu73X9M98aONNKdQs25RyhQdSzi EJqa1sdNUMunoAugQyiW6lpxRjnSwd0C5S21lG7qccwE/Naq+8DpmTX8WN2NNW/a4KeN yArFxB4EAvXw5R/sr/sFSP1lwQIHUW5PevCxZwtJFaKIzpeMi3yTP/d5Ga7p++tSB6iH cltA== 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 q67si2243928pjq.42.2019.09.04.05.35.54; Wed, 04 Sep 2019 05:36:10 -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 S1730246AbfIDMet (ORCPT + 99 others); Wed, 4 Sep 2019 08:34:49 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:60384 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730212AbfIDMes (ORCPT ); Wed, 4 Sep 2019 08:34:48 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 33425D06DACD2BBE5109; Wed, 4 Sep 2019 20:34:46 +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:35 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , Subject: [PATCH -next 07/15] thermal: kirkwood: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 20:29:31 +0800 Message-ID: <20190904122939.23780-8-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/kirkwood_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/kirkwood_thermal.c b/drivers/thermal/kirkwood_thermal.c index 189b675..762ef12 100644 --- a/drivers/thermal/kirkwood_thermal.c +++ b/drivers/thermal/kirkwood_thermal.c @@ -64,14 +64,12 @@ static int kirkwood_thermal_probe(struct platform_device *pdev) { struct thermal_zone_device *thermal = NULL; struct kirkwood_thermal_priv *priv; - struct resource *res; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->sensor = devm_ioremap_resource(&pdev->dev, res); + priv->sensor = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->sensor)) return PTR_ERR(priv->sensor); -- 2.7.4