Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp998902rwb; Mon, 26 Sep 2022 08:23:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4wEMnUMcPJBhNbnzHnzLpL7+/dRpRU3t4MHxWooHbT7oz/8PKboZUvcbKNH1j7GdPqN77F X-Received: by 2002:a50:fc9a:0:b0:454:6a56:7d27 with SMTP id f26-20020a50fc9a000000b004546a567d27mr22706335edq.73.1664205839399; Mon, 26 Sep 2022 08:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664205839; cv=none; d=google.com; s=arc-20160816; b=Q7ybcI3qgNxU55ZBjEFPPCJyZqRmsZ6q5NoJdeNx2wmrhM2ccH1uLX7E/71s+ErXYj sN21TYaf5tlBSUz6kSnp1QwYDhvyvf+qX9COjTHR9czJx4FdUsdG/0EqCzTt7YojWyE2 OufH6iYseK+GWQIoJRh3FKIUPNyCDtnMxfwkM7+7c1MgI2FuJaiQE6o5GY77LQJ+3qZE gzai7trDLBAlTAm7SQ+9JXJODZ/qUz3rgUGV+0WFbPqC2gNbxMZK9YIuXBZuFYph8czr TecdnZmKuq/Jq0v2FIjxgT7QMfZMW63OOi3fDEiK+cP8i/0uypXr7APMx6tqoCQ4ICVp 4ftQ== 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=G/YO0fJeKfkSzRqdgqFU3ij4yJaDOnZPHmbsRpXJf/A=; b=OEri5H5dFbjQythSY8D7bBm2v8rj2PCEV/+fgKykyePA8rhZyju7iWEobCuy0UwCg8 +XKnK5eq2PrE3lplXGOZzIQJ/WhnwAV0xFwWTLKq0jNQjLmXh7vMX3uUtYwofW/KwOE4 XPaU7sdS8uF18Ip3s8YbNqAn7yHdIi4P4gnnCkYPfj19MlSE4o/GJbgCoi+xyFDhMir8 QfypLzOAbePqahkmkQ0kqZWWWdV1CidbKeHJrCIaGmQ1CogVdCZ9UyV/hGEpmOEHGGfl bXLpQqRuWs21EjsM4iItknvMpnxeO3kZA5G2d4iD/VBZXhSklK7Dv4gaGKSGgJRK6PyG HPQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HpElmg1x; 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 6-20020a170906308600b0072fc714c92fsi68409ejv.902.2022.09.26.08.23.33; Mon, 26 Sep 2022 08:23:59 -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=HpElmg1x; 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 S236309AbiIZPVF (ORCPT + 99 others); Mon, 26 Sep 2022 11:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236473AbiIZPTU (ORCPT ); Mon, 26 Sep 2022 11:19:20 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50ED383042 for ; Mon, 26 Sep 2022 07:06:41 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id bq9so10432558wrb.4 for ; Mon, 26 Sep 2022 07:06:41 -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=G/YO0fJeKfkSzRqdgqFU3ij4yJaDOnZPHmbsRpXJf/A=; b=HpElmg1xiU/vguSyDzJ1AVanARz2FCVZ1PxbcRCFVeKyhTaIHkeqfn/IojyB2w0HO4 Xi+G2LDqzZOsYp2W0z8luiIbB3njOLZ+B0QGF5MkMKXFHEfqP93A4CKOxQRuniq5PmJm pAko7VTCs3uPqq1Ui41khWR2zYnsQShFi9lLPJvfRAWLW5mX/b6GdFUOUk+D5dvKAitz u+8WMlbY+bl8Rltp71qjdElQvVsTCdAcnMUXYoHxMX7w72U0hCyrjdQwcel3+TpuiFf0 BfCe9H28ZLWf3TMdlTuP8pJ1oiehJEIgkAkG+IkBeaXC+nfBdtKcZp8o4bYEi4IoTy9A 8fAg== 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=G/YO0fJeKfkSzRqdgqFU3ij4yJaDOnZPHmbsRpXJf/A=; b=xk4QFPzW6+DJ2yQaiHBYJxGJAvwAsJnuf1BEdD45PGIwgnUF50g3q9KeTb46BHH6vl zwTI1MJWTichRr0Kwov8qeDYQ+miO686iDYG9NmovOnmKHjz+mB+02BEPaRCh+7hFayy oh+ioECoxez392DxgFvxoBki1rALTMpBtOV0cRZJ8fGUdUMPl7c7NTzzw37tew9sQsOE 5KRUPtW8Wlg9E7pVJr0fEfhMnciwA2jNbCVgieaZ/QWSvkMjwV277lA5bF1TAomteBlT dGwRpiYaVctd8z8JP13BYtRNNMh2QtXk/MZPh5Fnr/CAd3WTi0rvv+bjxvMKtyvieymI djXw== X-Gm-Message-State: ACrzQf28xgoVRPos/xGb8ckyao4gZ2oGT1NkqtcZ+GCElZkto484SO2t JwRqqaAlNqOp4W5dmn1gsOVluQ== X-Received: by 2002:a5d:5089:0:b0:229:3151:2865 with SMTP id a9-20020a5d5089000000b0022931512865mr13264139wrt.81.1664201200781; Mon, 26 Sep 2022 07:06:40 -0700 (PDT) Received: from mai.. (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id v3-20020adfebc3000000b0022adf321d22sm14310731wrn.92.2022.09.26.07.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 07:06:40 -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, Amit Kucheria Subject: [PATCH v5 17/30] thermal/of: Remove of_thermal_get_ntrips() Date: Mon, 26 Sep 2022 16:05:51 +0200 Message-Id: <20220926140604.4173723-18-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220926140604.4173723-1-daniel.lezcano@linaro.org> References: <20220926140604.4173723-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 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=ham 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 OF code uses the generic trip points to initialize the thermal zone. Consequently thermal_zone_get_num_trips() can be used and the of_thermal_get_ntrips() is no longer needed. Remove it. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 5 ----- drivers/thermal/thermal_of.c | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index c5990a3fcf8a..b00fc1913734 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -139,13 +139,8 @@ thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev, /* device tree support */ #ifdef CONFIG_THERMAL_OF -int of_thermal_get_ntrips(struct thermal_zone_device *); bool of_thermal_is_trip_valid(struct thermal_zone_device *, int); #else -static inline int of_thermal_get_ntrips(struct thermal_zone_device *tz) -{ - return 0; -} static inline bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) { diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 2f533fc94917..89afa59c4915 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -19,22 +19,6 @@ #include "thermal_core.h" -/** - * of_thermal_get_ntrips - function to export number of available trip - * points. - * @tz: pointer to a thermal zone - * - * This function is a globally visible wrapper to get number of trip points - * stored in the local struct __thermal_zone - * - * Return: number of available trip points, -ENODEV when data not available - */ -int of_thermal_get_ntrips(struct thermal_zone_device *tz) -{ - return tz->num_trips; -} -EXPORT_SYMBOL_GPL(of_thermal_get_ntrips); - /** * of_thermal_is_trip_valid - function to check if trip point is valid * -- 2.34.1