From 37b0c020343080241984d978981d6caf877b278a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 26 Nov 2007 22:11:55 -0800 Subject: driver core: clean up device_shutdown device_shutdown does not need to be in a separate file. Move it into the driver core file where it belongs. This also moves us one more step closer to making devices_kset static, now only the crazy sysdevs are keeping that from happening... Signed-off-by: Greg Kroah-Hartman --- drivers/base/power/Makefile | 1 - drivers/base/power/shutdown.c | 43 ------------------------------------------- 2 files changed, 44 deletions(-) delete mode 100644 drivers/base/power/shutdown.c (limited to 'drivers/base/power') diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile index 44504e6618fb..06a86fe6a78d 100644 --- a/drivers/base/power/Makefile +++ b/drivers/base/power/Makefile @@ -1,4 +1,3 @@ -obj-y := shutdown.o obj-$(CONFIG_PM) += sysfs.o obj-$(CONFIG_PM_SLEEP) += main.o obj-$(CONFIG_PM_TRACE) += trace.o diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c deleted file mode 100644 index 5b6bc168ffba..000000000000 --- a/drivers/base/power/shutdown.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * shutdown.c - power management functions for the device tree. - * - * Copyright (c) 2002-3 Patrick Mochel - * 2002-3 Open Source Development Lab - * - * This file is released under the GPLv2 - * - */ - -#include -#include - -#include "../base.h" - -/** - * We handle system devices differently - we suspend and shut them - * down last and resume them first. That way, we don't do anything stupid like - * shutting down the interrupt controller before any devices.. - * - * Note that there are not different stages for power management calls - - * they only get one called once when interrupts are disabled. - */ - - -/** - * 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); - } - } -} -- cgit v1.2.3-59-g8ed1b