public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core: use initcall_debug to control shutdown info
@ 2012-11-23  7:14 ShuoX Liu
  0 siblings, 0 replies; only message in thread
From: ShuoX Liu @ 2012-11-23  7:14 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org; +Cc: Rafael J. Wysocki, Greg KH, Yanmin Zhang

From: ShuoX Liu <shuox.liu@intel.com>

syscore_shutdown uses initcall_debug to control the debug info output.
It’s a good programming. But device_shutdown doesn’t. The patch changes
device_shutdown to follow the style.

Signed-off-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Signed-off-by: ShuoX Liu <shuox.liu@intel.com>
---
 drivers/base/core.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index abea76c..985f69c 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1840,10 +1840,12 @@ void device_shutdown(void)
 		pm_runtime_barrier(dev);
 
 		if (dev->bus && dev->bus->shutdown) {
-			dev_dbg(dev, "shutdown\n");
+			if (initcall_debug)
+				dev_info(dev, "shutdown\n");
 			dev->bus->shutdown(dev);
 		} else if (dev->driver && dev->driver->shutdown) {
-			dev_dbg(dev, "shutdown\n");
+			if (initcall_debug)
+				dev_info(dev, "shutdown\n");
 			dev->driver->shutdown(dev);
 		}
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-23  7:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-23  7:14 [PATCH] driver core: use initcall_debug to control shutdown info ShuoX Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox