Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4699328rwb; Tue, 6 Sep 2022 11:11:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR7M1jIdlhqmKO4RRqDpEwyUJRpFjAVid9/qLeOu/bQFJSa/MwL4mnx6OORyTshNatUVh75l X-Received: by 2002:a63:5353:0:b0:434:8606:ce94 with SMTP id t19-20020a635353000000b004348606ce94mr5740788pgl.345.1662487910180; Tue, 06 Sep 2022 11:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662487910; cv=none; d=google.com; s=arc-20160816; b=HqAhPrixa082rrHXxinibs9n4vtEuMa0xT3+uA+yze2NFS9YMXnbH9LaPhMuA7F0lO 2cbBBVXMIcyY6evl4EJRb5NUBXfdghQjWpbzmsnvoEAJ6SZ8Zcj8xaBVNskFXYcEYYpu K38gPrK1lENdBThrjn3Qy4tGd4H0qoWVQwOotom/+eeysf/qUNFsimJTpRE4RedggJ7y 4acLt+8RUfPQQ8Zq9yldJz1MBaJB5YpdZFnPx/A74zY5ceI+YRs3rRdKp7DKYHF4JvAQ JBS9wplJwAMWLrRWaAnji5d3rBZNobkRipLkeH0aHpq4FRmZtUuFW1iSn6YYeDMwFHg6 4TbA== 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=KY22MjtoUlIwWIKxWwfuHh0wn9QBG3Vjtz/Dduvf6bU=; b=Y9VMXF0VxGHTaOTis9B05r11qCkFTNVwGExUUg0mw6HVKqtGWKBBub3AqpHG2Qy8mB tqGk69zznQP8EIaf19AP2orE55KOzlECfphp4zF3C0Sp6yMEFQqt9lwIfO+IR5Zrp/RC vTXcBsv1BaNbu4fm54HjZ+VeCOhMqsT36qUg/NDvoq75nwKHk3RRf7XToFkqyrTqr+38 /B1BlvW/m09++O4Wba3TfvzQDiT+mxdVHBDQYgeGk2p49AitEiY1XIkFks6gZfrzKcIJ nIxr3UcPa0D7hZ51VaTFAQIw9LhwQmGuPRIMDlTdb7+GHpAMo0vojgd6wm5nWRQzG198 A9Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aN9PiFxF; 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 g6-20020a1709026b4600b00172adace273si13678610plt.535.2022.09.06.11.11.37; Tue, 06 Sep 2022 11:11:50 -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=aN9PiFxF; 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 S239310AbiIFRCk (ORCPT + 99 others); Tue, 6 Sep 2022 13:02:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239152AbiIFRAe (ORCPT ); Tue, 6 Sep 2022 13:00:34 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2B0F6F573 for ; Tue, 6 Sep 2022 09:48:01 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id n23-20020a7bc5d7000000b003a62f19b453so9979880wmk.3 for ; Tue, 06 Sep 2022 09:48: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=KY22MjtoUlIwWIKxWwfuHh0wn9QBG3Vjtz/Dduvf6bU=; b=aN9PiFxFulWh9P/V4Crz48Fw6Up0k2wSiTJGHPwyPLdmF6RuT7ut5Bz2PC0utfF+Jh akGbJVYbzYi5H0EvB2HE9R2mqfLaxaUJLoQS69VxQao6Y1OeE9BjKNLi71TaLhtNyaAR RCDcT4W9JkLAr4cFlwHWCEXvrZgWZCutA4ECBl0yWbHsV92jGL2GRs8lFTJfnK4CVAth XdmpxvrQ9UVgnjJ+hPaaF3MefxcDVv5Cn63ON374fTl53sH9rcyZoK282N6k5VeX9jxv yYE5WJ25AH7LkTtat7FkbSUtlYeDsucK6ZS+Bp806ln6twOJZ2Dh2eZ7uNnHu8/8ROJE 10EQ== 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=KY22MjtoUlIwWIKxWwfuHh0wn9QBG3Vjtz/Dduvf6bU=; b=VkGUuXT0KeV2ZOVt5Om8S2d3cGhqYvMwJWPcvFRuAw6EtvqktcG7xLVwEowd7vUbrP N8/3iT/6qqpSx8PIzaLN14Tc6J/FfrlY1nRVRemk9KN0D3ubmqDLI5KuelYHm5y7o6/f Cfntbha8Fg38p9iezHr4pSR1J6HJL7Ucr3bFaVci+0x91ez7x3SG7Jb7qWEH8CdtXyxw K/66Xot1gAU2/8kkRAqeboTHnOIWQz0W9Ymk3Zk3LjsR6Om0WywpE+jIWCmoMp+j6TsQ If4gnAZiY0ZQ3E99FhuCR8o6kNxgavoit8ziccsnTxUmHkjvZi4ja65AQmWxMpjtgCTy eQCQ== X-Gm-Message-State: ACgBeo0omKLN8jajBuyNPpbZkBIxY1v3RtI/VZQSC7rSl9mc3IwZ4OgI wsaBCQ4UCEc1JuewXmZxIhM9lbHpzUncIg== X-Received: by 2002:a05:600c:3556:b0:3a6:220e:6242 with SMTP id i22-20020a05600c355600b003a6220e6242mr13850056wmq.145.1662482881017; Tue, 06 Sep 2022 09:48:01 -0700 (PDT) Received: from localhost.localdomain (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id e27-20020adf9bdb000000b0021f0ff1bc6csm7426600wrc.41.2022.09.06.09.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 09:48:00 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Amit Kucheria , Zhang Rui Subject: [PATCH v3 19/30] thermal/of: Remove of_thermal_set_trip_hyst() Date: Tue, 6 Sep 2022 18:47:09 +0200 Message-Id: <20220906164720.330701-20-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220906164720.330701-1-daniel.lezcano@linaro.org> References: <20220906164720.330701-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,T_SCC_BODY_TEXT_LINE 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 core is providing the generic thermal_zone_set_trip() function which does exactly what the OF ops function is doing. It is pointless to define our own version, just remove the ops and the thermal_zone_set_trip() will take care of it. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_of.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 4e54d62720dc..494e9c319541 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -19,18 +19,6 @@ #include "thermal_core.h" -static int of_thermal_set_trip_hyst(struct thermal_zone_device *tz, int trip, - int hyst) -{ - if (trip >= tz->num_trips || trip < 0) - return -EDOM; - - /* thermal framework should take care of data->mask & (1 << trip) */ - tz->trips[trip].hysteresis = hyst; - - return 0; -} - static int of_thermal_get_crit_temp(struct thermal_zone_device *tz, int *temp) { @@ -541,7 +529,6 @@ struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, goto out_kfree_trips; } - of_ops->set_trip_hyst = of_ops->set_trip_hyst ? : of_thermal_set_trip_hyst; of_ops->get_crit_temp = of_ops->get_crit_temp ? : of_thermal_get_crit_temp; of_ops->bind = thermal_of_bind; of_ops->unbind = thermal_of_unbind; -- 2.34.1