Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1187267rwb; Wed, 28 Sep 2022 14:39:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5PSwmf+jf7UuAbmuJ8H+6Q3h7crQVveipxW5bgK9hWWaqk81CqmMEnU4hIfrdfAAMtkiFD X-Received: by 2002:a63:5766:0:b0:440:2960:37d with SMTP id h38-20020a635766000000b004402960037dmr6421856pgm.278.1664401144451; Wed, 28 Sep 2022 14:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664401144; cv=none; d=google.com; s=arc-20160816; b=N65onpwW3Ii2PbOX5TjFRvAxBfRWhmC0ASNx2r8PgGN02enYr5xgnN2YHFfKaInnOl bzMnTq34NWcqBsRE8GiQGWHoo3OkEkg6vbXRTaPUX7D1IyuHUga4q/DpUdXZHcwjv3u3 oSkwCoeL/N7zFcFHiQFMBEKZ7D6I2TK1lBJTsw2dBxNFp1vx/5GxprxqTO4Rvs2SqDy2 DZNuUzSGEs2nGIkJfsjpr9Glvs7XTr57sKfRwwMbiTdMzS9SbDcSWZgwG0hYEWXu8nm/ Mha9EMWDcosOrDIkBG00juT+Iq0LpitjifMl5opKUrfYgY5/XjYFiG7f65Rm8uukKFKs 38Zg== 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=1AWJoT5e/i62IfiUuMjGPx9h/EPTvb6XMGcvcJiSEcOUY+/9KNZFkdAnU3BwC2KQap 3jUY1z5MPjNhfM+OrXALsr+gjfOMgKrZ+o5NafqO/e6Lthwx8V7PvVYGzgXV3VK8vRgS qTF8PWEX8VcGUcDJ0meEHR8titb08gH/jqfbPgy89CxoyGWJsKFW2ij3r0Xt1T8CCbD5 shAJi74aRNZCurMuOsVI2SSVPwBZZ/KfQzmqGtpOe/b1IcjEE8Gswx2D/yMMF91T4DFx ICTV+FtQ0iWxgeErrFtmzTYBYWTfOHBlvwuvWcniPwFDu10TafIsb7gBnrTUUiph90Db uzPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wp/3gYom"; 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 64-20020a620643000000b00557865ac3f8si3786279pfg.103.2022.09.28.14.38.53; Wed, 28 Sep 2022 14:39:04 -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="wp/3gYom"; 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 S234554AbiI1VFQ (ORCPT + 99 others); Wed, 28 Sep 2022 17:05:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233613AbiI1VEU (ORCPT ); Wed, 28 Sep 2022 17:04:20 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63D01DCCFF for ; Wed, 28 Sep 2022 14:02:01 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id e10-20020a05600c4e4a00b003b4eff4ab2cso2052942wmq.4 for ; Wed, 28 Sep 2022 14:02:01 -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=wp/3gYomuSn+cH+dI4T4DPO88iEjkVacUgcTXfHCYtw5lS7dMoqT1/8CHgl4nv84dP qV9PRtsdgzLT9lYvaqOTNQI/NLZayugsmCadLpNBLPQfMmczj3iksEH0sRLnQjiaFfId 1IdZBGL4r71jMaxLnoqphwMyu+X+0VEl9ExopvXDlNbx6q2mp2hM22QL2wNrgSz7zOcc eWx9+TOa4gHDSIleXgoOeI32OnFmI5yqvOLHawKVwomYwF+XIB2womR/L6tA7cIITHBM d34Ahu7TbPRlNhdIrZNfgy3MHmNIk5Cq/qtcaXlbkw01D0HkA9OSvMQ/3tJDEkQYS8sW Of1w== 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=sl3+di9FDlJXbfMuCkPutZ6OLfya7eOdh0FV6QIVpn+YzQubb/7d2rTgl4QnkajSPV vzPWWNZZPYJC2oJy/PwS53bXpOthaNdweZXKCCpajKnf2WGBJqtLfytCHF2vqRhFtVb6 3PI+3FjdE/1kUSOYLSLB3/auxHnEljTht0xTqsB4HjP3dZsVQPWeMTUqZWulw5dsn30q 0U4/C30xmGnf8S4tx2gpRa2GfXjKHHrBK2KWS8igURwPQBBPh60uEnmhGf0SJ+UM/69f fgRQkRikX2ln/xZP5954Q44gNrL+kYMTPYgBJfdjtEnzOL6EEiYe+6XqvQYlTnvPCGg8 gs3g== X-Gm-Message-State: ACrzQf1+M6oIFSmcsVpGQ1qOVxZ7jFzfaGXky8IGVsBi0MVk71MXl+Gt xc5NlLFGRnJ3LiZZU9+BGIvGiQ== X-Received: by 2002:a1c:7213:0:b0:3b3:4065:66cc with SMTP id n19-20020a1c7213000000b003b3406566ccmr8355353wmc.184.1664398919378; Wed, 28 Sep 2022 14:01:59 -0700 (PDT) Received: from mai.. ([2a05:6e02:1041:c10:48a2:39eb:9d1b:8b8d]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b003b4931eb435sm2874300wmq.26.2022.09.28.14.01.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 14:01:58 -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 v7 15/29] thermal/drivers/rcar_gen3: Use the generic function to get the number of trips Date: Wed, 28 Sep 2022 23:00:45 +0200 Message-Id: <20220928210059.891387-16-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220928210059.891387-1-daniel.lezcano@linaro.org> References: <20220928210059.891387-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