[PATCH] thunderbolt: Replace acpi_bus_get_device()

Rafael J. Wysocki posted 1 patch 4 years, 4 months ago
drivers/thunderbolt/acpi.c |    4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] thunderbolt: Replace acpi_bus_get_device()
Posted by Rafael J. Wysocki 4 years, 4 months ago
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/thunderbolt/acpi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-pm/drivers/thunderbolt/acpi.c
===================================================================
--- linux-pm.orig/drivers/thunderbolt/acpi.c
+++ linux-pm/drivers/thunderbolt/acpi.c
@@ -14,15 +14,15 @@
 static acpi_status tb_acpi_add_link(acpi_handle handle, u32 level, void *data,
 				    void **return_value)
 {
+	struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
 	struct fwnode_reference_args args;
 	struct fwnode_handle *fwnode;
 	struct tb_nhi *nhi = data;
-	struct acpi_device *adev;
 	struct pci_dev *pdev;
 	struct device *dev;
 	int ret;
 
-	if (acpi_bus_get_device(handle, &adev))
+	if (!adev)
 		return AE_OK;
 
 	fwnode = acpi_fwnode_handle(adev);



Re: [PATCH] thunderbolt: Replace acpi_bus_get_device()
Posted by Mika Westerberg 4 years, 4 months ago
On Tue, Feb 01, 2022 at 08:12:30PM +0100, 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>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Let me know if you want me to pick this up.
Re: [PATCH] thunderbolt: Replace acpi_bus_get_device()
Posted by Rafael J. Wysocki 4 years, 4 months ago
On Wed, Feb 2, 2022 at 10:36 AM Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
>
> On Tue, Feb 01, 2022 at 08:12:30PM +0100, 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>
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>
> Let me know if you want me to pick this up.

Yes, please, if you can.
Re: [PATCH] thunderbolt: Replace acpi_bus_get_device()
Posted by Mika Westerberg 4 years, 4 months ago
On Wed, Feb 02, 2022 at 02:46:26PM +0100, Rafael J. Wysocki wrote:
> On Wed, Feb 2, 2022 at 10:36 AM Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> >
> > On Tue, Feb 01, 2022 at 08:12:30PM +0100, 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>
> >
> > Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> >
> > Let me know if you want me to pick this up.
> 
> Yes, please, if you can.

Applied to thunderbolt.git/next, thanks!