Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2558772rwb; Mon, 3 Oct 2022 02:32:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4xio7ap1l06pGuLT3F3qLnhRR/GB7z6acbeS2jspS9DSjF2x8Ken2tC3jf+dz4aoeCPDi1 X-Received: by 2002:a17:907:60c6:b0:787:af55:87c2 with SMTP id hv6-20020a17090760c600b00787af5587c2mr14535737ejc.52.1664789560656; Mon, 03 Oct 2022 02:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664789560; cv=none; d=google.com; s=arc-20160816; b=Sc3tLY5pLyButYrixjgXiB0C+bHv5XeINB/pKqotqmgj4CWbs4J65wGEaBOv2c1SSH 2AyW6sTwfcGyI9RH96p1sc4bT1tZtpfQFvbSvVBSzWxNqUp/mes+OAryOnLzx88m2cJH BP38dnIZPk0w2NooCma/aDUcP+fkm3D70Xfzx20/M9EBDe7kU3SxDmPJX2VQMqX/BWhW UYChgebf6kPse3Zq3OheD4apALgO2J1l2DIbCY/nUGDRQLvB4P76goehyRo0ilrGHykp 7n/M4HZYdTY9GIC2tCseihOu+CjSEByclMtpMtWGqo1wU7Pk2Hz+JBuAs7K7X7VGouWi vWgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XrpGuF2vxbaEuk6VfKG2/A6XesW21KLMiogPr2+Ux0s=; b=C5zpyke8oqLoRQlZtkMwlul70+JtA40a3yHZHHvWtKjmJi68slAb9I9WMibAkOicB+ /jiGDvNWns9UvVIiC6PcScyxF8J3oElexXPch4+rKKUFyKnyE5/V4C2PQpWSAYhqyfYV vffb1ZefirkKz0qp4k2G43tY+6eYA9N7WKxwy8tLBzfmjzTtVdOSD/w5jcooUL0yME2i orY2ITaHG3ouchfa7O2uc0BaDe4UzanxvdvyC2GfeMo9VUBn4qpEQDe8fHv/Om5Jgs7k 0bdijPleZcaP66gT46dgLo4fti6EfNcszmTopWuRgjDTj2dPxVGVDe6xEoqai6k+Pr3x fEMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FwUjYB2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs42-20020a1709073eaa00b0078bb4d5db86si2026653ejc.77.2022.10.03.02.32.08; Mon, 03 Oct 2022 02:32:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FwUjYB2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231629AbiJCJ32 (ORCPT + 99 others); Mon, 3 Oct 2022 05:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbiJCJ2J (ORCPT ); Mon, 3 Oct 2022 05:28:09 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26FE933840 for ; Mon, 3 Oct 2022 02:27:05 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id t4so6598562wmj.5 for ; Mon, 03 Oct 2022 02:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=XrpGuF2vxbaEuk6VfKG2/A6XesW21KLMiogPr2+Ux0s=; b=FwUjYB2T9AIbmzsYSBvKKCrMjm17HTvWwOASeQXEfBL+bsID1ypiKj38B2o73wNPnZ H7JokdH/viUXtBFWJDoT9UMCG3wLOqDDLsleZpO3qE7otsTFSOirgQezV3hRcIjJinDc FvZ6fxuFoLaA+uLAPeX98iW6dU3KhuFxEJJ6msX7KcEyYCgnRdd3mXykDJmaN8mq1UqL XghXhEjxJAUYOsEusCP2sbokgsVHFEn0u4YUnD3IYcj+9SLpLzHE3B0e5W2h25gleWU7 SUCwhvoUm94R19mGmZf2YcM1wYSzK1y7dW1mgfFDr5qeOR2Bbq1Rg5R9MMpgQVF9ACvP sNTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=XrpGuF2vxbaEuk6VfKG2/A6XesW21KLMiogPr2+Ux0s=; b=2LYkMLT/lFR7Dpbla7kZepuBcSQoVSkkODyrvlh7lqCC3t47S4W7+XavCH4o34+U/D +JDQ4qR4kKyLEEpxgukqHICf3W+GXqp+eptKe/hmxlSsBeUvL4RsN4aSMKwl0RiiLEoM fxfTwMQiscOErIg3SEXz9XSJi408y8S3vQYIXbJlYGt32mY9VcyAzFnEyGazcWCkNNh1 om7Yy8Yzoctgl34heTWkGFIP6BOYIFG4JIrBibpMkDuLfRXDsJ1/1r+lQ/N1irUwG95p uFT3G69M3CvW5tIDE1n0VrnKnIQFp6pmRy3mzemOv+3Fb7jVox8AZgZP2SSAcJnjB0AN Lysg== X-Gm-Message-State: ACrzQf0bEAEv2HhUS7CIU9aYD770syqkYxDVhkHcG7cw7uOU75PreOTn UHLtTVkyoOMjoWc8E7C8Oa5gkQ== X-Received: by 2002:a05:600c:19ce:b0:3b9:c36f:f9e2 with SMTP id u14-20020a05600c19ce00b003b9c36ff9e2mr2242971wmq.110.1664789224486; Mon, 03 Oct 2022 02:27:04 -0700 (PDT) Received: from mai.. ([2a05:6e02:1041:c10:f3a:9f5e:1605:a75a]) by smtp.gmail.com with ESMTPSA id ay3-20020a5d6f03000000b0022cc157bf26sm9707520wrb.85.2022.10.03.02.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 02:27:04 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rui.zhang@intel.com, Raju Rangoju , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Peter Kaestle , Hans de Goede , Mark Gross , Miquel Raynal , Amit Kucheria , Nicolas Saenz Julienne , Broadcom Kernel Team , Florian Fainelli , Ray Jui , Scott Branden , Support Opensource , Lukasz Luba , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Thara Gopinath , Andy Gross , Bjorn Andersson , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Alim Akhtar , Thierry Reding , Jonathan Hunter , Eduardo Valentin , Keerthy , Kunihiko Hayashi , Masami Hiramatsu , Antoine Tenart , Srinivas Pandruvada , Dmitry Osipenko , netdev@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCH v8 15/29] thermal/drivers/rcar_gen3: Use the generic function to get the number of trips Date: Mon, 3 Oct 2022 11:25:48 +0200 Message-Id: <20221003092602.1323944-16-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221003092602.1323944-1-daniel.lezcano@linaro.org> References: <20221003092602.1323944-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The thermal core framework allows to get the number of thermal trips, use it instead of visiting the thermal core structure internals. Signed-off-by: Daniel Lezcano Reviewed-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 4c1c6f89aa2f..4ef927437842 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -529,7 +529,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) if (ret) goto error_unregister; - ret = of_thermal_get_ntrips(tsc->zone); + ret = thermal_zone_get_num_trips(tsc->zone); if (ret < 0) goto error_unregister; -- 2.34.1