From patchwork Thu Dec 21 12:48:16 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: 182210 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp387181dyi; Thu, 21 Dec 2023 04:56:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IErDzXqI3ukLlAIk0tKWu3uL622wbaim/az1srXAJMct/bWgCZQbZvwp+8FaUl/9Fsue3AJ X-Received: by 2002:a05:6a20:431a:b0:187:a4df:4e57 with SMTP id h26-20020a056a20431a00b00187a4df4e57mr970824pzk.20.1703163384251; Thu, 21 Dec 2023 04:56:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163384; cv=none; d=google.com; s=arc-20160816; b=esHQDVhLeMK9U7eLyH6cD2FF/mdRvSdI0vIv8/ahaTdPPd3Kg3TLqyD6eWTJByF2aM xlkqdDPDQZRZT9HQHKVRkygCrBuRkx3zmpHpGLhUrjNpPwr9nZaWjJC/gLinG1EOKHrR 6WcY0ePUqXqi5QSF0RfrxWSUPWZnhX3N6igLvHvAaGnwehRllAY3XJFObsIDbv3vUhCi Ef7yf61JxH4rATHVpIQJtN62/aFdH2BfIUS7pl18w9WTf9Y8srEcELH9UBlQ8+g5Uj94 EcHmU/S++7rp0mTjcywl0Ogpf5dIj4G3CccR4z4y+2oahZrmRPb6iMrAOVCsNY7R1Ug5 yc8Q== 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=cP0GcV9tuKuaYHqA4tdvV7b4r4Zk7Z414X5t6mEP/l8=; fh=tj3vwvS1joPqVAqhm025RI9FzN3aC+9rlGGIIVsXGr8=; b=JoSjCFfQan/vP13PAwbdVohoYoVpKtHN4ha4YyQ5fJURonWJnbYDbj49v5NekCJLl1 s2qhKRGNqVEL2Iim7ibZcwPbcYnQ6X4V1KddS+XKQAUY/ctWbM6dARZvVJWF7oViNhK8 tuuNYJZhfcaM9Y+Bqm2vO+j7ovVxvtmHkZbXOSiT0c+9lJyBucl2gGBkGZZadK+tfwtr 6J61jCUUIS51UXIhMf53dQ73DAwq3xp7Wk97Aas0auq10sDewAlFd8qqcDDPrIS/3ZSX CvQbSx/7qep+vnbcmz2/RXfWnTc3vOlRCa8EZL7AxS6oyEQoTkinMUkRRRlpc/Itu7Kh c9ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="HdlNm/lr"; spf=pass (google.com: domain of linux-kernel+bounces-8386-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8386-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x19-20020a170902b41300b001d05aa54912si1441058plr.504.2023.12.21.04.56.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:56:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8386-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="HdlNm/lr"; spf=pass (google.com: domain of linux-kernel+bounces-8386-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8386-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 35AF6B2369F for ; Thu, 21 Dec 2023 12:54:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3DB47B3D4; Thu, 21 Dec 2023 12:48:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="HdlNm/lr" 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 0A73F7995E; Thu, 21 Dec 2023 12:48:46 +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=1703162925; bh=L31yIrmZZhUrsQD11ECO7zUb5b6T40l2nXIhxFSEcLk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HdlNm/lrnFfpEGr9id8D7nnqQIUw+fEXiRCLGINaeB80x0WrR9HSKLWAcFtEX9DNY MgFF/FT5bK/5RobU0AdeNvLpFOn0bwZTJdUd+H/B0ZJuGPJOBOmRq9b63ECVOZ4WzP 4MXqmVSIiqpWMNcF01PS+8VNt/0gQdmaYuVAvzszOaqQTamG5iC3KXdjMA39vnUgR/ IB4AtxXb9ScySAWL9inb9dfEk6KoqIuo394r5bgKmyKcS0D0EVYjGUhCiGYU62lRO2 iUi97mgYim9aVtgGDRmRwN8NwXSLZPay5SpUGqGT5XZKMGQcArwhD5I9rzXx79V3f/ ufuSOdsMfDcNQ== 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 E604E3782017; Thu, 21 Dec 2023 12:48:44 +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 17/26] thermal/drivers/dove: Migrate to thermal_zone_device_register() Date: Thu, 21 Dec 2023 13:48:16 +0100 Message-ID: <20231221124825.149141-18-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: 1785896248532185643 X-GMAIL-MSGID: 1785896248532185643 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/dove_thermal.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c index ac30de3c0a5f..09ed02395d12 100644 --- a/drivers/thermal/dove_thermal.c +++ b/drivers/thermal/dove_thermal.c @@ -117,6 +117,10 @@ static const struct of_device_id dove_thermal_id_table[] = { static int dove_thermal_probe(struct platform_device *pdev) { + struct thermal_zone_device_params tzdp = { + .type = "dove_thermal", + .ops = &ops + }; struct thermal_zone_device *thermal = NULL; struct dove_thermal_priv *priv; int ret; @@ -139,8 +143,8 @@ static int dove_thermal_probe(struct platform_device *pdev) return ret; } - thermal = thermal_tripless_zone_device_register("dove_thermal", priv, - &ops, NULL); + tzdp.devdata = priv; + thermal = thermal_zone_device_register(&tzdp); if (IS_ERR(thermal)) { dev_err(&pdev->dev, "Failed to register thermal zone device\n");