Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp636895ybe; Wed, 4 Sep 2019 05:36:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAA/f2JPxm4HYwd1JpCvsf6++e14AJ0dCqQhmEF9ZnmypBMmEaFAQEcziDHSjE5+WHYbR7 X-Received: by 2002:a17:90a:cf8a:: with SMTP id i10mr4770101pju.109.1567600584626; Wed, 04 Sep 2019 05:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567600584; cv=none; d=google.com; s=arc-20160816; b=OJh90bRpwkb9+7e32O7J+hpL0V85nPOCN2Ly0vaeI1sQkEzjRAXlbXH5Dl6oH07LNI 3Cspj1L3ba9ucZzP6Gbohn5dGJnAzU3KHK1F4312foZ9ZrgY71uzQtKsKTt2LR4ZiXQz i3bASygQDhjGtmwzcJtvxKxqpR+xhsZ/suat+G4epODd8IfQLEVhFAfY0t8l57ZqXPaa AAnDclGh0tdpBr3IkDCc4UBTSNGY3oU3UMko9BPzEOlMvYf60IXgC2sltWt+3t4tlY31 5GTtY73hOxnY21Lz9hF5U4FHAhEPCy5KKqpShb4j1vqs9dIal7PjRHXEJ0TlcRNikkMR L6qw== 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=u+B/zMhOQZ4D56A0pB0sZMNHrS1n6mqxjBc8wrbftwY=; b=svIruQ1uh/giF5rLSYGg9EQIfjhFE3kaKoV2IKrpr+rB/oyTfK3thoJH7FBQKWF2zl F5hvXzUpDZYEmOTgY91YJP+iSlyjvo4E9v/ElX2P/FiuuZ4sPIctw0JdHVvEHRJCNggx 1a6eEkVOXkJdBdiXDGkBUh/O5SYKFYzegu57Qkebb1XRgGFbUrQlnoZ0nBqEhx4IKOT+ prE84uBvFTfZChFUdw3bBj9T57OnA0j2wnxdPrcVj3wES9+VnVbTfWiHzb6flSpuf9KD AH1GRsRARnCjGUzydIcZAFAk8Iy73b4yF+v/2KWbcReRWwcCrwGFXdzXo50C0Jq2bJ/E qpjw== 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 u9si11491808plz.145.2019.09.04.05.36.08; Wed, 04 Sep 2019 05:36:24 -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 S1730316AbfIDMfA (ORCPT + 99 others); Wed, 4 Sep 2019 08:35:00 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57848 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729996AbfIDMe6 (ORCPT ); Wed, 4 Sep 2019 08:34:58 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 56C999540FCF8AE3D4A9; Wed, 4 Sep 2019 20:34:56 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 20:34:48 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , Subject: [PATCH -next 12/15] thermal: tango: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 20:29:36 +0800 Message-ID: <20190904122939.23780-13-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/tango_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c index 304b461..f44441b 100644 --- a/drivers/thermal/tango_thermal.c +++ b/drivers/thermal/tango_thermal.c @@ -73,7 +73,6 @@ static void tango_thermal_init(struct tango_thermal_priv *priv) static int tango_thermal_probe(struct platform_device *pdev) { - struct resource *res; struct tango_thermal_priv *priv; struct thermal_zone_device *tzdev; @@ -81,8 +80,7 @@ static int tango_thermal_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); -- 2.7.4