From patchwork Thu Dec 21 12:48:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 182203 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp386442dyi; Thu, 21 Dec 2023 04:54:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPOC93EZnaLk7KwD+WTQxx+qWidIrzpGnS4fxfKIqP1SMhYII2qSFpByJewE4zjtcL6lfw X-Received: by 2002:a50:d796:0:b0:553:98b5:6816 with SMTP id w22-20020a50d796000000b0055398b56816mr2699185edi.65.1703163296572; Thu, 21 Dec 2023 04:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163296; cv=none; d=google.com; s=arc-20160816; b=rl3Q0C2igbs99z0Z6LTfeuCPMAUuT0wYJfYlN6HndBlpCHYtp7hVD03XIE1xNQ45Mq 4yvcD2+SjhB75G/TOQW3WRMU5HppJGo0wFJJQ8j7JZaLKvz+7ro/yxMj5bwFTDrtiU6m nfb5Z5w7krlXpqy5F7qdANsjjayfvd6g7QrX5/KnoSVjSdsN3ZUUFAiiPIMEg13q5RBF xWBVL/a9+wxOofWDEdqLj/0lCq3jxySQkPwjj4OFhVKsOicg5AMP88cKEAR1oFaVRd3V 9nV9dUDiF/hfGdpVjtaUJOBPAkPTE5MVX6Wl1LZuKEzNB9A0vepGo/+mlBDFhxtVdXg+ 66fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HAVPUbouOr/j/NNwDU030IhLcF1/1clc5YIxGA8yhKE=; fh=tj3vwvS1joPqVAqhm025RI9FzN3aC+9rlGGIIVsXGr8=; b=QH4/aN0ed37tywG7204id31TFas1xqAy4qei8z6Gm690A+Xj2cScKfxK8FDIRm3qHY pWlWC7J4rdxQ23Bgb8rYe3WA8DIC/timXkqVhMMOhVPNyD5tvCRviWlvU3V2DfZQKlG6 2vs9QWBnvCju4L6BGUmcEPBx3LDxxjOXvtP7if+fpxN339paX1LU4B+r8Kdtj+zCPV9m aOmY434mASnLaWDVxWvcWenKA8q/XSbQ2uS5VuDkT8KPWNMOQb1zz2HpJm1OkjzITRIO 6bvmgbdyvtFQUEk3VWguMiaBdTC9Q3Owa6ohqxQ3z/ZSYCN/Covi96GdYdW0NTsjAOlS v9vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=PVPjgZyC; spf=pass (google.com: domain of linux-kernel+bounces-8390-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8390-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dk18-20020a0564021d9200b00553a7472908si834179edb.517.2023.12.21.04.54.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:54:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8390-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=PVPjgZyC; spf=pass (google.com: domain of linux-kernel+bounces-8390-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8390-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 329511F263D5 for ; Thu, 21 Dec 2023 12:54:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D674A7C66D; Thu, 21 Dec 2023 12:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="PVPjgZyC" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 414227AE7B; Thu, 21 Dec 2023 12:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703162927; bh=IzGXP7pU6vgksVmgOm8IVqKNTU11eGk4o8LGz/dSNic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PVPjgZyCfYFO033Aa4w6Zfpat7VbZzivozeRdDK8DYjwtiY3sdwdXsNJ3Qev1liTs vxBXJOUuuzacj3D8cWibZLDKmIo4bk/NXeGNNbS7Vok9imkK8wV/dLLudEq8cf0oTf /brH2cIXgJANZ8JFbicSX7exL1Jrp7RWvakS83ANrzpAITAuXKzC1v0MQtO0Nn4+JD sVvXB5SsYq1ugaiSRaA47IGXEQJ/uL7iz3BzN34tauZwR8vuJXz5dfsm0iN4hLQkXA XrK5t2o1WmFlYKs5g5gYb5Nt1lG/Bxhl0vijrC+EoTuFNfCdgwrE6R7F6SuuvZMM+L YT/jmQwkwaRUA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 30282378200A; Thu, 21 Dec 2023 12:48:47 +0000 (UTC) From: AngeloGioacchino Del Regno To: daniel.lezcano@linaro.org Cc: rafael@kernel.org, rui.zhang@intel.com, lukasz.luba@arm.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno , kernel@collabora.com Subject: [RFC PATCH 20/26] thermal/drivers/int340x: Migrate to thermal_zone_device_register() Date: Thu, 21 Dec 2023 13:48:19 +0100 Message-ID: <20231221124825.149141-21-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221124825.149141-1-angelogioacchino.delregno@collabora.com> References: <20231221124825.149141-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785896156621748428 X-GMAIL-MSGID: 1785896156621748428 The thermal API has a new thermal_zone_device_register() function which is deprecating the older thermal_zone_device_register_with_trips() and thermal_tripless_zone_device_register(). Migrate to the new thermal zone device registration function. Signed-off-by: AngeloGioacchino Del Regno --- .../intel/int340x_thermal/int3400_thermal.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c index 427d370648d5..87bfc1f9a5a4 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -536,11 +536,6 @@ static struct thermal_zone_device_ops int3400_thermal_ops = { .change_mode = int3400_thermal_change_mode, }; -static struct thermal_zone_params int3400_thermal_params = { - .governor_name = "user_space", - .no_hwmon = true, -}; - static void int3400_setup_gddv(struct int3400_thermal_priv *priv) { struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; @@ -571,6 +566,14 @@ static void int3400_setup_gddv(struct int3400_thermal_priv *priv) static int int3400_thermal_probe(struct platform_device *pdev) { + struct thermal_zone_device_params tzdp = { + .type = "INT3400 Thermal", + .tzp = { + .governor_name = "user_space", + .no_hwmon = true + }, + .ops = &int3400_thermal_ops + }; struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); struct int3400_thermal_priv *priv; int result; @@ -609,9 +612,7 @@ static int int3400_thermal_probe(struct platform_device *pdev) evaluate_odvp(priv); - priv->thermal = thermal_tripless_zone_device_register("INT3400 Thermal", priv, - &int3400_thermal_ops, - &int3400_thermal_params); + priv->thermal = thermal_zone_device_register(&tzdp); if (IS_ERR(priv->thermal)) { result = PTR_ERR(priv->thermal); goto free_art_trt;