Commit 78c7e8f0 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Driver core: add CONFIG_DEBUG_DRIVER to help track down driver core bugs easier.

parent ca32c38e
......@@ -8,4 +8,15 @@ config FW_LOADER
require hotplug firmware loading support, but a module built outside
the kernel tree does.
config DEBUG_DRIVER
bool "Driver Core verbose debug messages"
depends on DEBUG_KERNEL
help
Say Y here if you want the Driver core to produce a bunch of
debug messages to the system log. Select this if you are having a
problem with the driver core and want to see more of what is
going on.
If you are unsure about this, say N here.
endmenu
......@@ -8,7 +8,10 @@
*
*/
#undef DEBUG
#include <linux/config.h>
#ifdef CONFIG_DEBUG_DRIVER
#define DEBUG 1
#endif
#include <linux/device.h>
#include <linux/module.h>
......
......@@ -10,7 +10,10 @@
*
*/
#undef DEBUG
#include <linux/config.h>
#ifdef CONFIG_DEBUG_DRIVER
#define DEBUG 1
#endif
#include <linux/device.h>
#include <linux/module.h>
......
......@@ -8,7 +8,10 @@
*
*/
#define DEBUG 1
#include <linux/config.h>
#ifdef CONFIG_DEBUG_DRIVER
#define DEBUG 1
#endif
#include <linux/device.h>
#include <linux/kdev_t.h>
......
......@@ -8,7 +8,10 @@
*
*/
#undef DEBUG
#include <linux/config.h>
#ifdef CONFIG_DEBUG_DRIVER
#define DEBUG 1
#endif
#include <linux/device.h>
#include <linux/err.h>
......
......@@ -8,7 +8,10 @@
*
*/
#undef DEBUG
#include <linux/config.h>
#ifdef CONFIG_DEBUG_DRIVER
#define DEBUG 1
#endif
#include <linux/device.h>
#include <linux/module.h>
......
......@@ -19,7 +19,10 @@
* ancestral dependencies that the subsystem list maintains.
*/
#undef DEBUG
#include <linux/config.h>
#ifdef CONFIG_DEBUG_DRIVER
#define DEBUG 1
#endif
#include <linux/device.h>
#include "power.h"
......
......@@ -8,7 +8,10 @@
*
*/
#undef DEBUG
#include <linux/config.h>
#ifdef CONFIG_DEBUG_DRIVER
#define DEBUG 1
#endif
#include <linux/device.h>
#include <asm/semaphore.h>
......@@ -54,7 +57,7 @@ void device_shutdown(void)
down_write(&devices_subsys.rwsem);
list_for_each_entry_reverse(dev,&devices_subsys.kset.list,kobj.entry) {
pr_debug("shutting down %s: ",dev->name);
pr_debug("shutting down %s: ",dev->bus_id);
if (dev->driver && dev->driver->shutdown) {
pr_debug("Ok\n");
dev->driver->shutdown(dev);
......
......@@ -12,7 +12,10 @@
* add themselves as children of the system bus.
*/
#undef DEBUG
#include <linux/config.h>
#ifdef CONFIG_DEBUG_DRIVER
#define DEBUG 1
#endif
#include <linux/sysdev.h>
#include <linux/err.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment