Skip to contentSkip to conversation

cpufreq: longhaul: Replace acpi_bus_get_device()

PATCH In review Rafael J. Wysocki 2 participants 2 messages Jan 26, 2022 – Feb 9, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: longhaul: Replace acpi_bus_get_device()

From: Rafael J. Wysocki <[email protected]>

Replace acpi_bus_get_device() that is going to be dropped with acpi_fetch_acpi_dev().

No intentional functional impact.

---
 drivers/cpufreq/longhaul.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/longhaul.c +2 -2
Index: linux-pm/drivers/cpufreq/longhaul.c
===================================================================
@@ -668,9 +668,9 @@ static acpi_status longhaul_walk_callbac
 					  u32 nesting_level,
 					  void *context, void **return_value)
 {
-	struct acpi_device *d;
+	struct acpi_device *d = acpi_fetch_acpi_dev(obj_handle);
 
-	if (acpi_bus_get_device(obj_handle, &d))
+	if (!d)
 		return 0;
 
 	*return_value = acpi_driver_data(d);
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

Replace acpi_bus_get_device() that is going to be dropped with acpi_fetch_acpi_dev().

No intentional functional impact.

---
 drivers/cpufreq/longhaul.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-pm/drivers/cpufreq/longhaul.c
===================================================================

drivers/cpufreq/longhaul.c +0 -0
@@ -668,9 +668,9 @@ static acpi_status longhaul_walk_callbac
 					  u32 nesting_level,

drivers/cpufreq/longhaul.c static acpi_status longhaul_walk_callbac · line 676

Quoted 10 lines
drivers/cpufreq/longhaul.c +2 -2
 					  void *context, void **return_value)
 {
-	struct acpi_device *d;
+	struct acpi_device *d = acpi_fetch_acpi_dev(obj_handle);
 
-	if (acpi_bus_get_device(obj_handle, &d))
+	if (!d)
 		return 0;
 
 	*return_value = acpi_driver_data(d);
Signature · 1 line
viresh