ACPI: property: Use acpi_dev_for_each_child() for child lookup
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 13 Jun 2022 18:16:30 +0000 (20:16 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 20 Jun 2022 18:33:08 +0000 (20:33 +0200)
commitfa98b3985a4a6de6d40b2469b30a3452575f6acf
tree2d239883e3c174196b3363fe96a575545f3fb2b4
parentabda0af4cd3b4703649ca78abf8d283f279a3f90
ACPI: property: Use acpi_dev_for_each_child() for child lookup

Instead of using the list of children of an ACPI device directly,
use acpi_dev_for_each_child() to find the next child of a given
ACPI device.

This will help to eliminate the children list head from struct
acpi_device as it is redundant and it is used in questionable ways
in some places (in particular, locking is needed for walking the
list pointed to it safely, but it is often missing).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/acpi/property.c