diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-01-26 20:55:39 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-31 14:30:06 +0100 |
commit | f31afa6151ae6b2cc6bc55e6383db85dbfc5ad2d (patch) | |
tree | 13f2d971c429c17b0ff00243eaa37654c08f7a25 /drivers | |
parent | 4c6123873a42dc5144e4c53bb8376c14fc92336d (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serdev/core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index 92e3433276f8..0180e1e4e75d 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -704,13 +704,10 @@ static const struct acpi_device_id serdev_acpi_devices_blacklist[] = { static acpi_status acpi_serdev_add_device(acpi_handle handle, u32 level, void *data, void **return_value) { + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); struct serdev_controller *ctrl = data; - struct acpi_device *adev; - if (acpi_bus_get_device(handle, &adev)) - return AE_OK; - - if (acpi_device_enumerated(adev)) + if (!adev || acpi_device_enumerated(adev)) return AE_OK; /* Skip if black listed */ |