]> git.baikalelectronics.ru Git - kernel.git/commit
soundwire: Use acpi_dev_for_each_child()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 13 Jun 2022 18:35:26 +0000 (20:35 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 23 Jun 2022 18:53:06 +0000 (20:53 +0200)
commita6a5c3e948521df51eb9dc5cdda243816ef9df46
treeffd91a26f3d3970a54082f66f13ccee6ff154e4e
parentabc0cd38514d65d14e0ad1bba5dc8dd60f0d8519
soundwire: Use acpi_dev_for_each_child()

Instead of walking the list of children of an ACPI device directly,
use acpi_dev_for_each_child() to carry out an action for all of
the given ACPI device's children.

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: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/slave.c