summaryrefslogtreecommitdiff
path: root/drivers/mfd/mfd-core.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-07-27 18:04:01 +0300
committerLee Jones <lee.jones@linaro.org>2015-07-28 10:50:43 +0300
commitb9a8a271c38fcb1664fd6034fb9326cc9a0dec94 (patch)
tree7f405a968fccebf27cda19e58d1975f80f2a7adb /drivers/mfd/mfd-core.c
parent3d060aeb72113cda0acf906bfe26914fc689506a (diff)
downloadlinux-b9a8a271c38fcb1664fd6034fb9326cc9a0dec94.tar.xz
mfd: make mfd_remove_devices() iterate in reverse order
The newly introduced device_for_each_child_reverse() would be used when MFD core removes the device. After this patch applied the devices will be removed in a reversed order. This behaviour is useful when devices have implicit dependency on order, i.e. consider MFD device with serial bus controller, such as SPI, and DMA IP that is attached to serial bus controller: before remove the DMA driver we have to be ensured that no DMA transfers is ongoing and the requested channel are unused. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/mfd-core.c')
-rw-r--r--drivers/mfd/mfd-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 14fd5cbcf0f2..c17635d3e504 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -302,7 +302,7 @@ void mfd_remove_devices(struct device *parent)
{
atomic_t *cnts = NULL;
- device_for_each_child(parent, &cnts, mfd_remove_devices_fn);
+ device_for_each_child_reverse(parent, &cnts, mfd_remove_devices_fn);
kfree(cnts);
}
EXPORT_SYMBOL(mfd_remove_devices);