2022-01-26 22:35:02

by Rafael J. Wysocki

[permalink] [raw]
Subject: [PATCH] tty: 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.

Signed-off-by: Rafael J. Wysocki <[email protected]>
---
drivers/tty/serdev/core.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

Index: linux-pm/drivers/tty/serdev/core.c
===================================================================
--- linux-pm.orig/drivers/tty/serdev/core.c
+++ linux-pm/drivers/tty/serdev/core.c
@@ -704,13 +704,10 @@ static const struct acpi_device_id serde
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 */




2022-01-27 14:04:45

by Jiri Slaby

[permalink] [raw]
Subject: Re: [PATCH] tty: Replace acpi_bus_get_device()

On 26. 01. 22, 20:55, Rafael J. Wysocki wrote:
> 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.
>
> Signed-off-by: Rafael J. Wysocki <[email protected]>

Reviewed-by: Jiri Slaby <[email protected]>

thanks,
--
js
suse labs