From patchwork Thu Dec 21 12:48:08 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: 182191 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp384971dyi; Thu, 21 Dec 2023 04:51:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGoo2bC4eLk4jZyHjiAhtm9AZ3qYZC2WixP7NiLXp7CG6/lBCQSceZuaOHAUFjfMbX/ROTb X-Received: by 2002:a17:90b:30d6:b0:28b:f58f:ea99 with SMTP id hi22-20020a17090b30d600b0028bf58fea99mr277151pjb.52.1703163110878; Thu, 21 Dec 2023 04:51:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163110; cv=none; d=google.com; s=arc-20160816; b=07wlrfXj6k31HO5xDZSz/nqd37FSusZ6WVq8EglR1S/1dpbhYyxULs/Wi8Xlir6T0m y+q8z/MEkOOvVAhtD+mdIXLMMREr5cmcl+xx82Gl2FIr1eEi3h051x2ybsWwjLfuFETM ntLNrsUwIK3xYVPHx+T9OzY6GBrT1OubwSBWjX8HW6q8yzAd/5o4nB45dT35AshJKuIu SFQ2kmLBJC8qTNCpz4Y6ns2NBC6f1CWMiMur5zGUPDbTmOwowiCE5B+MEWGuq3qXeRGx eOfDhsc+yJWOc3xjoBnsSAvprgJUbpljw5e1QK9kwhJv5haRolOMhODMSOj64MZEHZmc Bnmg== 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=dF3CntZ+RsGzw4wjLBNjUMNZwudSmNvEaPrxRUxlieo=; fh=tj3vwvS1joPqVAqhm025RI9FzN3aC+9rlGGIIVsXGr8=; b=KdStCKIFR62xT1Kf/UPewNW3S6Z8JE8caRPyoaK0RBxVYC3GyirmA5stG1nhCHMXAW lbT8Ef7pTalTiRWiBh+geVZbwKKP6fJdfd+SFV4SIg9o/16taw1a5PelFnCRBOtBUHn+ VIhN6hi7FG/UR8IHoog99cEQuVgb75V0XKfwsnpN11JHh0vHZqlBgIJ9uIQDAYufAgpf TgRjFAQNaTAMxPjC+lzmWr9YPlMsmImcD84bhczgb4lKZS6IDpH2JZklcg9HohJiJHcQ wAk/XP6PkQv9q7ws7R+wL81FvycnU0yz0y0qEz97fUXYwzzRb7vJOhqfDE+3nwEkOv1N 1kmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=4+r83MQy; spf=pass (google.com: domain of linux-kernel+bounces-8376-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8376-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h5-20020a17090ac38500b0028b67355609si1626195pjt.136.2023.12.21.04.51.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:51:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8376-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=4+r83MQy; spf=pass (google.com: domain of linux-kernel+bounces-8376-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8376-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0C3762896A9 for ; Thu, 21 Dec 2023 12:51:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C4BA678E64; Thu, 21 Dec 2023 12:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="4+r83MQy" 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 C410776DAA; Thu, 21 Dec 2023 12:48:40 +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=1703162919; bh=wnC+dcrhV0iVIaIyTNFPvehYMUi62DJkXerciRSKVSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=4+r83MQyzpu6fAk2k1xACe732mKnUBZgWFfeM/NfE/jiCilqyNRPfMJo5DU7CYTC9 AjgqIEBnhLWPVtDIgOv0UqPIcPLGdjG7S/Ekt15wOndD2uH65/sSlBKxM6QrT01cPd VRSugMaow5/dqhviYdrBF6jJIje4O/RTyqufwuhgMh8qRL7Z4BfXkJHdU9rwOz92tY LpCqJjFXfDSwQQ87T/JJVVnzDCtnPeIPzAdWVIpoKFjO6oORsxOwHEHjFKagFyGpBu k3fp9OZjzMoSIc/90BhPl4G1Kn/ZzYrIOk+oXO7P+tccTQJZ8WIk+dDnAia/7IaEgx dNRmZAv7Cfhfg== 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 B92A4378200E; Thu, 21 Dec 2023 12:48:38 +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 09/26] thermal: intel: pch_thermal: Migrate to thermal_zone_device_register() Date: Thu, 21 Dec 2023 13:48:08 +0100 Message-ID: <20231221124825.149141-10-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: 1785895962151398856 X-GMAIL-MSGID: 1785895962151398856 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 --- drivers/thermal/intel/intel_pch_thermal.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c index b3905e34c507..dfc4b206633e 100644 --- a/drivers/thermal/intel/intel_pch_thermal.c +++ b/drivers/thermal/intel/intel_pch_thermal.c @@ -159,6 +159,7 @@ static const char *board_names[] = { static int intel_pch_thermal_probe(struct pci_dev *pdev, const struct pci_device_id *id) { + struct thermal_zone_device_params tzdp = { .ops = &tzd_ops }; enum pch_board_ids board_id = id->driver_data; struct pch_thermal_device *ptd; int nr_trips = 0; @@ -233,10 +234,12 @@ static int intel_pch_thermal_probe(struct pci_dev *pdev, nr_trips += pch_wpt_add_acpi_psv_trip(ptd, nr_trips); - ptd->tzd = thermal_zone_device_register_with_trips(board_names[board_id], - ptd->trips, nr_trips, - 0, ptd, &tzd_ops, - NULL, 0, 0); + tzdp.type = board_names[board_id]; + tzdp.devdata = ptd; + tzdp.trips = ptd->trips; + tzdp.num_trips = nr_trips; + + ptd->tzd = thermal_zone_device_register(&tzdp); if (IS_ERR(ptd->tzd)) { dev_err(&pdev->dev, "Failed to register thermal zone %s\n", board_names[board_id]);