]> git.karo-electronics.de Git - linux-beck.git/commit
mfd: make mfd_remove_devices() iterate in reverse order
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 27 Jul 2015 15:04:01 +0000 (18:04 +0300)
committerLee Jones <lee.jones@linaro.org>
Tue, 28 Jul 2015 07:50:43 +0000 (08:50 +0100)
commitb9a8a271c38fcb1664fd6034fb9326cc9a0dec94
tree7f405a968fccebf27cda19e58d1975f80f2a7adb
parent3d060aeb72113cda0acf906bfe26914fc689506a
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>
drivers/mfd/mfd-core.c