diff options
| author | 2022-01-26 20:41:27 +0100 | |
|---|---|---|
| committer | 2022-02-03 11:56:01 +0100 | |
| commit | 6768bddb70f028a03cb297f18402988599959f7e (patch) | |
| tree | 5cc4241246c35c6c878f77ec19c630c61e1ce65b /drivers/platform/surface/surface3-wmi.c | |
| parent | platform/x86: Replace acpi_bus_get_device() (diff) | |
| download | linux-dev-6768bddb70f028a03cb297f18402988599959f7e.tar.xz linux-dev-6768bddb70f028a03cb297f18402988599959f7e.zip | |
platform/surface: 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.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/5805278.lOV4Wx5bFT@kreacher
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/surface/surface3-wmi.c')
| -rw-r--r-- | drivers/platform/surface/surface3-wmi.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/platform/surface/surface3-wmi.c b/drivers/platform/surface/surface3-wmi.c index 09ac9cfc40d8..089a8a48d920 100644 --- a/drivers/platform/surface/surface3-wmi.c +++ b/drivers/platform/surface/surface3-wmi.c @@ -116,15 +116,11 @@ static acpi_status s3_wmi_attach_spi_device(acpi_handle handle, void *data, void **return_value) { - struct acpi_device *adev, **ts_adev; + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); + struct acpi_device **ts_adev = data; - if (acpi_bus_get_device(handle, &adev)) - return AE_OK; - - ts_adev = data; - - if (strncmp(acpi_device_bid(adev), SPI_TS_OBJ_NAME, - strlen(SPI_TS_OBJ_NAME))) + if (!adev || strncmp(acpi_device_bid(adev), SPI_TS_OBJ_NAME, + strlen(SPI_TS_OBJ_NAME))) return AE_OK; if (*ts_adev) { |
