Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5540899pxb; Wed, 26 Jan 2022 14:33:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvSxOz9iyc+NjcehudMqDJisgQwbLLz+CCcwLX7fipt2AW55TOwhQ6fNi3woBwZzEy2xbW X-Received: by 2002:a17:906:1f57:: with SMTP id d23mr617651ejk.693.1643236408396; Wed, 26 Jan 2022 14:33:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643236408; cv=none; d=google.com; s=arc-20160816; b=rAZu0NWzrjk/4A6r4/WaouFrQfz0LczikRw+fBGDDyWpEeQ/NfBu08AjOINkqB/X5+ i5TNXjxp6rmrggpCJZg/43kbIOq+ueaKudgDY0DTcP1KD9/HefFWButc39H/HKPK7E4Y icPyRBHP1gagkQnEk5wD8ehnoz/Xk9qXr8ZGQJwDlz0J7U3mzxO+eexu/wN991yu8/je LP4keUsKlSSSs37vlua+GB8VL06aKs/O39Byh4o13vl8wRNNxbe0tf/JMbnG4EsKWs8c VJCOYuaSt3tCY18GcayZDEMU0xNWUDswLq6NMST4uUNxNBlICwl94AqEIqG+MZ7KE8hF PjNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=uPFZYn0hhbklOVIlO2C5zKztSFWx8QCfd6QtM98/YxM=; b=RJzZcsN7+Hy+z5xyrbrGMoh28Ubb34rkDHqyU2NxnjKg7N0XI37Bu/T8TUQoxu8LVh eJE16b1vyRmlvSObVEtyzG8gRx/ZAJs/hj2E6bGBwb+Xu53vZKY6O0FzQUXJxNA4P6fh lVcl2bx+c7U52+IMVRFvba563Xb5leiGGBSocvLKVI07B85tddHwAJjQ/dMpQz6qmXMx zErYZPmSanfiHO5BebnGaODwD/P3P1CuAuoZ+IWR3tPsHvuUWhOSRj/Upz6b2K3Pi9zT WFGF8TnB2RN4XysafaIrLVG+xeIDWsZbzwf+srgZkMcslAP8TAM7wqMIS8SR2M/VnHgR nxEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g13si252969edy.568.2022.01.26.14.33.03; Wed, 26 Jan 2022 14:33:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231959AbiAZTpV (ORCPT + 99 others); Wed, 26 Jan 2022 14:45:21 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:61494 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230032AbiAZTpU (ORCPT ); Wed, 26 Jan 2022 14:45:20 -0500 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 4.0.0) id 8e44157e9f18981b; Wed, 26 Jan 2022 20:45:19 +0100 Received: from kreacher.localnet (unknown [213.134.162.63]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 1CFEE66B311; Wed, 26 Jan 2022 20:45:18 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Linux ACPI , Daniel Lezcano , Srinivas Pandruvada , Zhang Rui Subject: [PATCH] thermal: Replace acpi_bus_get_device() Date: Wed, 26 Jan 2022 20:45:17 +0100 Message-ID: <2107233.irdbgypaU6@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.162.63 X-CLIENT-HOSTNAME: 213.134.162.63 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvvddrfedugdduvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpefhgedtffejheekgeeljeevvedtuefgffeiieejuddutdekgfejvdehueejjeetvdenucfkphepvddufedrudefgedrudeivddrieefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeivddrieefpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeeipdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepuggrnhhivghlrdhlvgiitggrnhhosehlihhnrghrohdrohhrghdprhgtphht thhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Replace acpi_bus_get_device() that is going to be dropped with acpi_fetch_acpi_dev(). No intentional functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c | 23 ++++----------- 1 file changed, 7 insertions(+), 16 deletions(-) Index: linux-pm/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c =================================================================== --- linux-pm.orig/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c +++ linux-pm/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c @@ -72,7 +72,6 @@ int acpi_parse_trt(acpi_handle handle, i int i; int nr_bad_entries = 0; struct trt *trts; - struct acpi_device *adev; union acpi_object *p; struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_buffer element = { 0, NULL }; @@ -112,12 +111,10 @@ int acpi_parse_trt(acpi_handle handle, i if (!create_dev) continue; - result = acpi_bus_get_device(trt->source, &adev); - if (result) + if (!acpi_fetch_acpi_dev(trt->source)) pr_warn("Failed to get source ACPI device\n"); - result = acpi_bus_get_device(trt->target, &adev); - if (result) + if (!acpi_fetch_acpi_dev(trt->target)) pr_warn("Failed to get target ACPI device\n"); } @@ -149,7 +146,6 @@ int acpi_parse_art(acpi_handle handle, i int i; int nr_bad_entries = 0; struct art *arts; - struct acpi_device *adev; union acpi_object *p; struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_buffer element = { 0, NULL }; @@ -191,16 +187,11 @@ int acpi_parse_art(acpi_handle handle, i if (!create_dev) continue; - if (art->source) { - result = acpi_bus_get_device(art->source, &adev); - if (result) - pr_warn("Failed to get source ACPI device\n"); - } - if (art->target) { - result = acpi_bus_get_device(art->target, &adev); - if (result) - pr_warn("Failed to get target ACPI device\n"); - } + if (!acpi_fetch_acpi_dev(art->source)) + pr_warn("Failed to get source ACPI device\n"); + + if (!acpi_fetch_acpi_dev(art->target)) + pr_warn("Failed to get target ACPI device\n"); } *artp = arts;