aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/surface/surface_acpi_notify.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2024-01-26 10:26:50 +0100
committerIngo Molnar <mingo@kernel.org>2024-01-26 10:26:50 +0100
commit42ac0be18bfa09c03f52244f7c3e15c89b38532f (patch)
tree601fd5e6da2ca0b77aa8cb22f0e81a29ba6fe1d6 /drivers/platform/surface/surface_acpi_notify.c
parent8e5647a723c49d73b9f108a8bb38e8c29d3948ea (diff)
parentecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7 (diff)
Merge branch 'linus' into x86/mm, to refresh the branch and pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/platform/surface/surface_acpi_notify.c')
-rw-r--r--drivers/platform/surface/surface_acpi_notify.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/platform/surface/surface_acpi_notify.c b/drivers/platform/surface/surface_acpi_notify.c
index e4dee920da18..20f3870915d2 100644
--- a/drivers/platform/surface/surface_acpi_notify.c
+++ b/drivers/platform/surface/surface_acpi_notify.c
@@ -736,34 +736,6 @@ do { \
#define san_consumer_warn(dev, handle, fmt, ...) \
san_consumer_printk(warn, dev, handle, fmt, ##__VA_ARGS__)
-static bool is_san_consumer(struct platform_device *pdev, acpi_handle handle)
-{
- struct acpi_handle_list dep_devices;
- acpi_handle supplier = ACPI_HANDLE(&pdev->dev);
- acpi_status status;
- bool ret = false;
- int i;
-
- if (!acpi_has_method(handle, "_DEP"))
- return false;
-
- status = acpi_evaluate_reference(handle, "_DEP", NULL, &dep_devices);
- if (ACPI_FAILURE(status)) {
- san_consumer_dbg(&pdev->dev, handle, "failed to evaluate _DEP\n");
- return false;
- }
-
- for (i = 0; i < dep_devices.count; i++) {
- if (dep_devices.handles[i] == supplier) {
- ret = true;
- break;
- }
- }
-
- acpi_handle_list_free(&dep_devices);
- return ret;
-}
-
static acpi_status san_consumer_setup(acpi_handle handle, u32 lvl,
void *context, void **rv)
{
@@ -772,7 +744,7 @@ static acpi_status san_consumer_setup(acpi_handle handle, u32 lvl,
struct acpi_device *adev;
struct device_link *link;
- if (!is_san_consumer(pdev, handle))
+ if (!acpi_device_dep(handle, ACPI_HANDLE(&pdev->dev)))
return AE_OK;
/* Ignore ACPI devices that are not present. */