Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2559324rwb; Mon, 3 Oct 2022 02:33:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5kn5W5xQGV8mgW81mWrBHbi/ppHr1I3+B/1tWQAvn6KY+fbSQKenedH9h75hpGXodFBFwf X-Received: by 2002:a17:907:7fa1:b0:782:7c58:5341 with SMTP id qk33-20020a1709077fa100b007827c585341mr14493335ejc.368.1664789595857; Mon, 03 Oct 2022 02:33:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664789595; cv=none; d=google.com; s=arc-20160816; b=qINSflAgBixIVltOd6A84SHqrl3ZUQtjGXz+eBDzUu+6stkWs/frVVdbLnzijF9pXI mv6X2eJXJK/1vJA9y5asuEdINEGi0WPDJ5KFAe4DAACEmZkt9BVDgpGdHuHOy2r6u82F Zsmm72IMvd68JJDyhalZRW3LoNNRyfBDZdpTsRV3ajh29Ydd8lzUWScazy3rrzyi2eve kMrDQcU4TToVHkUFeXTG/gGg4Xz3Y5O3VpAwHnhzk++s/ybxycGMJhDhWBSggdNeC3fU LZXU7HsQLIvFYEyYo58s8OHQlhk2NWBx+7Dpwr3OENcvbmFv9fKflKhdoVNc9C3r40b7 YDbA== 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=w7wjOBcwlZN7QsLSIrWvtnBl4v+jpvDVm8do/mZ97SXlHDbhtbTZnq/fZiOfhIfd/w vZs5Sx9+Yir0w7UIDwRJ27QlCgJYhl8d8oasUAvK+N3xr8lAH/pxYSKOjtSJib/TTFm5 e+QWotNwkOCtSKkmYRIm219XCSHEEUjD/WiJ3CnB8X6bwvinkxZkuoIvTW9aYIpYctLe pClzPlPg2SsFfL78xZDxBlDaBgSoCkubsTHeD8km3IzhQWaC18fZ4dUBiS+NZNhKp3KR 1FRJGWvCC9n/WgM9LGlzAjVcneykRSUhDhnEkEz/mC5WV1s/LTqFeQkKM7Q30TUE6kiL ytYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MBR6ICFK; 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 u12-20020a17090657cc00b007823d2b20fdsi6460293ejr.219.2022.10.03.02.32.42; Mon, 03 Oct 2022 02:33:15 -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=MBR6ICFK; 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 S229493AbiJCJau (ORCPT + 99 others); Mon, 3 Oct 2022 05:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231617AbiJCJ30 (ORCPT ); Mon, 3 Oct 2022 05:29:26 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CFB0520A0 for ; Mon, 3 Oct 2022 02:27:34 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id ay7-20020a05600c1e0700b003b49861bf48so6970186wmb.0 for ; Mon, 03 Oct 2022 02:27:34 -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=MBR6ICFKe+bl+7FRTDTi1pMSJNfC6nvWkInuXTT4JyAomFJPJVBJJkxfVAfrsHbwRl 1T2koRRcYrNPgbQUvuFGZUYbc4Cg+AlmEGzCAzNcorg37i4/MEbSQKGLEwkKZ6jTVc4V 8JqeBEwvkIPuEMpQu2JNM0wcpI2M6kB8Gu0trgvgXGXJmMqLupuvws3YqCur0UeofD0S rksWdtR5952Vw4eQmAaD3TIJn4LftUwyQZFm86MpmG7VsSMbBG0KJlK8bqfCF9PlQP3Z XNE9lMPFyt1l/70K3zswWSEtMamUhu9BhFM37qs6Wps0jnlNsuVpX9CD1wf53hssHTbJ 60rQ== 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=uRCJCN4eJDa/0pnhGNlFufsf+EaSFwHd6f0zYRklFuRBQUYQhiptD2k5fb6/zZic4n OvJExxR+loeaY9u+KU05KEWigNfeLWEsy5kUrANATdTqwxcjx+L2eQwrfe3uU6fDS6/q AsOHhzmpxcmTErS2snv8rZPH40rzG9ua3nl6UTdJyKdhD+4OE8jgPtYxqopp1R6yL+WP u94AKn0+GLqbUqrdf0uJzN6cffpWsRyd9mfmLSJiuKwI0JNOV0tOEw698nWK0lfdMgRs jjhcuOMh1Hcvrtxg5eNrjFkcpe1fKc05WHZRlB9HGDaEalXpKiujWxubHupZynI9siws nERA== X-Gm-Message-State: ACrzQf2I0aidnH3b3VpufNitmzOWnVJrA6T+XBLoInt+0B3+0+Td5zuV QfCR1jES9p4usLO77+fL5qXS7A== X-Received: by 2002:a05:600c:3ac9:b0:3b4:bed4:d69 with SMTP id d9-20020a05600c3ac900b003b4bed40d69mr6421993wms.131.1664789234207; Mon, 03 Oct 2022 02:27:14 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 02:27:13 -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 Subject: [PATCH v8 18/29] thermal/of: Remove of_thermal_set_trip_hyst() Date: Mon, 3 Oct 2022 11:25:51 +0200 Message-Id: <20221003092602.1323944-19-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-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 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