Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: Replace acpi_bus_get_device()

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

No intentional functional impact.

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/7355105.EvYhyI6sBW@kreacher
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rafael J. Wysocki and committed by
Greg Kroah-Hartman
f31afa61 4c612387

+2 -5
+2 -5
drivers/tty/serdev/core.c
··· 704 704 static acpi_status acpi_serdev_add_device(acpi_handle handle, u32 level, 705 705 void *data, void **return_value) 706 706 { 707 + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); 707 708 struct serdev_controller *ctrl = data; 708 - struct acpi_device *adev; 709 709 710 - if (acpi_bus_get_device(handle, &adev)) 711 - return AE_OK; 712 - 713 - if (acpi_device_enumerated(adev)) 710 + if (!adev || acpi_device_enumerated(adev)) 714 711 return AE_OK; 715 712 716 713 /* Skip if black listed */