Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp121736rdb; Thu, 21 Dec 2023 04:49:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdYJI8XE8B0osyAcQTnvAfDlpQPhOB2eYCYrmMmXR+WWGNmtBAw3E9jt8UBAGW9l/Akpno X-Received: by 2002:ad4:470b:0:b0:67a:89b4:b0c3 with SMTP id qb11-20020ad4470b000000b0067a89b4b0c3mr18042787qvb.35.1703162971018; Thu, 21 Dec 2023 04:49:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703162971; cv=none; d=google.com; s=arc-20160816; b=HPu6c1OUL4Z8pw35UgQAkp1JpMTVzj/g6I8pEThOb7ipa4fOrTUcs/xk8Kp4XJ6kui GYQLmkwyOn+7HizD0PGVp3Z+66Qy8BG2jp9ezm0E/NeMO4G2dhpU5342wvepbxboAFW6 NOmxLwECfv5042FEEpsKAZQiw2IvDDeLGiOr8HFtY3iSH0ZGRmzDxIgHGqR73Gt/dl5g DLtcXAadflqw/Yi28mchylrz80KFxZwJ4iiXb3f9vCpvnUIgXUaH+v9o7Zz0dOjZqwBl 0zR1X3QcCGmWa4/7UDFSIuzccsZnF+FfrYP5uMNgSKEPZT9HebB2u5D4vnRaw/+bCrGj CFiw== 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=oGqKluHGGtMc9u+X/bvzD0M1OrsJxjPdmMCRWMgzeQo=; fh=tj3vwvS1joPqVAqhm025RI9FzN3aC+9rlGGIIVsXGr8=; b=kAXpuUophhMTIm/HBuCnqKnKdHOS2UPikPEu2srCobs0tjpjOp8nKT1tkhXohs02a1 l9p/oloQtAkaAnQwaksfAg0GxP3hZVdFXOfvQUMoqoG/KxdQtgSbM8u2iMQiQ8qRSM3m juDLn5cBq3uzKZicjN9ClkmILM1J7OBJIJl1NLIQj+t81bDf1Lww9HenJ6XJ4NaMW6jR zjb4GyKYm0DWhn4RflJadxojI5g86kwwqE5wrM9cF69jfvIlhIuMmYeQ3iBM3Th3v/Wx MjqYEWTut0+inK391R+FtMmTdxy8yg3up1NMWIS8CXnBBbVOCFY5L3yAPqkNC0uX49mW 6GeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=eBhoe2sl; spf=pass (google.com: domain of linux-kernel+bounces-8371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8371-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h11-20020a0cf40b000000b0067f892110e4si554605qvl.526.2023.12.21.04.49.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:49:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=eBhoe2sl; spf=pass (google.com: domain of linux-kernel+bounces-8371-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8371-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C147C1C23BA7 for ; Thu, 21 Dec 2023 12:49:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D82C760AF; Thu, 21 Dec 2023 12:48:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="eBhoe2sl" 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 2E8B974087; Thu, 21 Dec 2023 12:48:36 +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=1703162915; bh=wYH99HJxGwYPUgw1yllFolH3TiZQvNSnRw2wR2wMWDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eBhoe2sl9Wdo73MB1dJsbH4HO8TSEMWSwSBP4KHs2bTPYVtmc4Jes2HjCmh3jzIU/ jNJJLnsPTG8/T8vKpTSLK+sHpMaqWVnK6WLiDNBYIVf11MHB/kv35RXmxFC5hpyTJW U17OC/+3kgAe1QQRf/Y8bbZ0C3+mLYS6WgG+euz+bEY3NfyDHVS2alE4sbcP9LC9Bj pqxwcQ/rDpQRnjz2j0bLwij5CsPhHhgQGmRnxWhiL8Ann4YwOH1+jNRVpSc7QKXjKm Xa2ymIWDQkHB/Yjir3w/PPKpfRCrAgWcYm1Aff764fYddhQ6/Mfd0FVa+6KN87pcHw JZeywBMMTFOYg== 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 DD8083782005; Thu, 21 Dec 2023 12:48:34 +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 04/26] ACPI: thermal: Migrate to thermal_zone_device_register() Date: Thu, 21 Dec 2023 13:48:03 +0100 Message-ID: <20231221124825.149141-5-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 Content-Transfer-Encoding: 8bit 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/acpi/thermal.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index ee28ca93d983..e4f44e7bb3ec 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -664,16 +664,18 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz, unsigned int trip_count, int passive_delay) { + struct thermal_zone_device_params tzdp = { + .type = "acpitz", + .devdata = tz, + .ops = &acpi_thermal_zone_ops, + .trips = tz->trip_table, + .num_trips = trip_count, + .passive_delay = passive_delay, + .polling_delay = tz->polling_frequency * 100, + }; int result; - tz->thermal_zone = thermal_zone_device_register_with_trips("acpitz", - tz->trip_table, - trip_count, - 0, tz, - &acpi_thermal_zone_ops, - NULL, - passive_delay, - tz->polling_frequency * 100); + tz->thermal_zone = thermal_zone_device_register(&tzdp); if (IS_ERR(tz->thermal_zone)) return PTR_ERR(tz->thermal_zone); -- 2.43.0