Skip to contentSkip to conversation

driver core: use initcall_debug to control shutdown info

PATCH New ShuoX Liu 1 participant 1 message Nov 23, 2012 Driver core

lore
Share & tools
lore

ShuoX Liu

author
#0 lore raw

PATCH 1/1 driver core: use initcall_debug to control shutdown info

From: ShuoX Liu <[email protected]>

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.

---
 drivers/base/core.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/base/core.c +4 -2
index abea76c..985f69c 100644
@@ -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);
 		}
 
Signature · 1 line
1.7.1