From patchwork Thu Dec 21 12:48:03 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: 182186 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp384215dyi; Thu, 21 Dec 2023 04:50:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHIpntuC82V+HbB4oIIgO7AkrM5YG2U6Oqobkayg8ZBv+LYjQVprn2Dpum74h6MIBBIGIuy X-Received: by 2002:a17:902:d549:b0:1d0:6ffd:9e22 with SMTP id z9-20020a170902d54900b001d06ffd9e22mr27247281plf.116.1703163021738; Thu, 21 Dec 2023 04:50:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703163021; cv=none; d=google.com; s=arc-20160816; b=L/u+GzCAnzx8ssLLVxjggBnMOMf1OsbUlDakAAeyZFqqfbXJnnGASHnZWDcNCL5Q99 Uo2PBgtjBFOgBlvraVSyPTBEFomsDG7DDx8EPP4tOQrYWAQU4BXTChtT3g0DVOHJvB0z eN7VjiHmIZ9z0OXwmjUBaxdY0D9h3HUVCjFzRLvI02WUGjNmjxioFwXIYYfECANFsSTz xtl6N/DIM9LSYWfVebHe02bHbo/9VKSew16Zw4BOnRaA0fixSdLqibNN8caEKO/Nr1xx CeCdTO9BmZeN0qGKbG51heofacUFHcq56TOROOG9o67eGg3D08N3gzNQtyGTw8xTBleJ ULVw== 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-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8371-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 a20-20020a1709027d9400b001d33c368c1bsi1415139plm.126.2023.12.21.04.50.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 04:50:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8371-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=eBhoe2sl; spf=pass (google.com: domain of linux-kernel+bounces-8371-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8371-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 A2A262894F6 for ; Thu, 21 Dec 2023 12:50:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1831B76DB9; Thu, 21 Dec 2023 12:48:41 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785895868393080008 X-GMAIL-MSGID: 1785895868393080008 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);