/* device_shutdown - call ->shutdown() on each device to shutdown.  */
void device_shutdown(void)
/* device_shutdown - call ->shutdown() on each device to shutdown.  */
void device_shutdown(void)
{
	struct device *dev, *devn;
	list_for_each_entry_safe_reverse(dev, devn, &devices_kset->list,
				kobj.entry) {
		if (dev->bus && dev->bus->shutdown) {
			dev_dbg(dev, "shutdown\n");
			dev->bus->shutdown(dev);
		} else if (dev->driver && dev->driver->shutdown) {
			dev_dbg(dev, "shutdown\n");
			dev->driver->shutdown(dev);
		}
	}
	async_synchronize_full();
}