aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorDaniel Scally <djrscally@gmail.com>2022-09-22 00:04:35 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-09-24 19:12:32 +0200
commitcca8a7efea6402f463239a1bb337d01b0cad7b2e (patch)
treeeb7ce6efbf056a9a0703df30358d8c15f60390b4 /drivers/platform
parentACPI: property: Use acpi_dev_parent() (diff)
downloadlinux-dev-cca8a7efea6402f463239a1bb337d01b0cad7b2e.tar.xz
linux-dev-cca8a7efea6402f463239a1bb337d01b0cad7b2e.zip
ACPI: scan: Add acpi_dev_get_next_consumer_dev()
In commit b83e2b306736 ("ACPI: scan: Add function to fetch dependent of ACPI device") we added a means of fetching the first device to declare itself dependent on another ACPI device in the _DEP method. One assumption in that patch was that there would only be a single consuming device, but this has not held. Replace that function with a new function that fetches the next consumer of a supplier device. Where no "previous" consumer is passed in, it behaves identically to the original function. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Daniel Scally <djrscally@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel/int3472/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel/int3472/common.c b/drivers/platform/x86/intel/int3472/common.c
index 77cf058e4168..9db2bb0bbba4 100644
--- a/drivers/platform/x86/intel/int3472/common.c
+++ b/drivers/platform/x86/intel/int3472/common.c
@@ -62,7 +62,7 @@ int skl_int3472_get_sensor_adev_and_name(struct device *dev,
struct acpi_device *sensor;
int ret = 0;
- sensor = acpi_dev_get_first_consumer_dev(adev);
+ sensor = acpi_dev_get_next_consumer_dev(adev, NULL);
if (!sensor) {
dev_err(dev, "INT3472 seems to have no dependents.\n");
return -ENODEV;