Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver core: use initcall_debug to control shutdown info

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

ShuoX Liu and committed by
Greg Kroah-Hartman
0246c4fa 83ca897d

+4 -2
+4 -2
drivers/base/core.c
··· 1840 1840 pm_runtime_barrier(dev); 1841 1841 1842 1842 if (dev->bus && dev->bus->shutdown) { 1843 - dev_dbg(dev, "shutdown\n"); 1843 + if (initcall_debug) 1844 + dev_info(dev, "shutdown\n"); 1844 1845 dev->bus->shutdown(dev); 1845 1846 } else if (dev->driver && dev->driver->shutdown) { 1846 - dev_dbg(dev, "shutdown\n"); 1847 + if (initcall_debug) 1848 + dev_info(dev, "shutdown\n"); 1847 1849 dev->driver->shutdown(dev); 1848 1850 } 1849 1851