summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2004-03-02 00:39:36 -0800
committerGreg Kroah-Hartman <greg@kroah.com>2004-03-02 00:39:36 -0800
commit78c7e8f04fc63a9faf73070647dbb619dee9b5bd (patch)
treece9ebc77e272caf4a8e6e22f739c2c8e1cbd911d /drivers/base
parentca32c38e8efa89d103f4f84ff91a7e71fb94c927 (diff)
Driver core: add CONFIG_DEBUG_DRIVER to help track down driver core bugs easier.
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/Kconfig11
-rw-r--r--drivers/base/bus.c5
-rw-r--r--drivers/base/class.c5
-rw-r--r--drivers/base/class_simple.c5
-rw-r--r--drivers/base/core.c5
-rw-r--r--drivers/base/driver.c5
-rw-r--r--drivers/base/power/main.c5
-rw-r--r--drivers/base/power/shutdown.c7
-rw-r--r--drivers/base/sys.c5
9 files changed, 44 insertions, 9 deletions
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index 213416fd6c43..323263d4ad39 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -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
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 5a2b6b74daf1..f826312d984b 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -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>
diff --git a/drivers/base/class.c b/drivers/base/class.c
index d9dbf7eea4d0..043037cbf47a 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -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>
diff --git a/drivers/base/class_simple.c b/drivers/base/class_simple.c
index 3ea8ada88d14..cc842c46c1b6 100644
--- a/drivers/base/class_simple.c
+++ b/drivers/base/class_simple.c
@@ -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>
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 01c710bdeb9d..9d40a0b3bec6 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -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>
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 7fd9d5c1d539..f90a12e1a0a3 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -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>
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index f02478eb2173..1ff4b80a0945 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -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"
diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c
index a48b97681329..afcd162a11f8 100644
--- a/drivers/base/power/shutdown.c
+++ b/drivers/base/power/shutdown.c
@@ -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);
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 9a4caaeae740..42f36d565bfa 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -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>