All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: Replace acpi_bus_get_device()
@ 2022-01-26 19:55 Rafael J. Wysocki
  2022-01-27  7:39 ` Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2022-01-26 19:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Greg Kroah-Hartman, LKML, Linux ACPI, Jiri Slaby, linux-serial

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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 <rafael.j.wysocki@intel.com>
---
 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 */




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] tty: Replace acpi_bus_get_device()
  2022-01-26 19:55 [PATCH] tty: Replace acpi_bus_get_device() Rafael J. Wysocki
@ 2022-01-27  7:39 ` Jiri Slaby
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2022-01-27  7:39 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rob Herring
  Cc: Greg Kroah-Hartman, LKML, Linux ACPI, linux-serial

On 26. 01. 22, 20:55, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> 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 <rafael.j.wysocki@intel.com>

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-27  7:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26 19:55 [PATCH] tty: Replace acpi_bus_get_device() Rafael J. Wysocki
2022-01-27  7:39 ` Jiri Slaby

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.