]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit601fa8452490143ab9e39708a62f5d682d99dbb0
tree2d239883e3c174196b3363fe96a575545f3fb2b4
parenta4976f2650f9109e6ee048704553ae668b3c6eec
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