public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Driver Core update for 2.6.4-rc1
Date: Tue, 2 Mar 2004 20:16:39 -0800	[thread overview]
Message-ID: <10782873993395@kroah.com> (raw)
In-Reply-To: <10782873992219@kroah.com>

ChangeSet 1.1612.24.4, 2004/03/02 16:39:36-08:00, greg@kroah.com

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


 drivers/base/Kconfig          |   11 +++++++++++
 drivers/base/bus.c            |    5 ++++-
 drivers/base/class.c          |    5 ++++-
 drivers/base/class_simple.c   |    5 ++++-
 drivers/base/core.c           |    5 ++++-
 drivers/base/driver.c         |    5 ++++-
 drivers/base/power/main.c     |    5 ++++-
 drivers/base/power/shutdown.c |    7 +++++--
 drivers/base/sys.c            |    5 ++++-
 9 files changed, 44 insertions(+), 9 deletions(-)


diff -Nru a/drivers/base/Kconfig b/drivers/base/Kconfig
--- a/drivers/base/Kconfig	Tue Mar  2 19:48:11 2004
+++ b/drivers/base/Kconfig	Tue Mar  2 19:48:11 2004
@@ -8,4 +8,15 @@
 	  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 -Nru a/drivers/base/bus.c b/drivers/base/bus.c
--- a/drivers/base/bus.c	Tue Mar  2 19:48:11 2004
+++ b/drivers/base/bus.c	Tue Mar  2 19:48:11 2004
@@ -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 -Nru a/drivers/base/class.c b/drivers/base/class.c
--- a/drivers/base/class.c	Tue Mar  2 19:48:11 2004
+++ b/drivers/base/class.c	Tue Mar  2 19:48:11 2004
@@ -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 -Nru a/drivers/base/class_simple.c b/drivers/base/class_simple.c
--- a/drivers/base/class_simple.c	Tue Mar  2 19:48:11 2004
+++ b/drivers/base/class_simple.c	Tue Mar  2 19:48:11 2004
@@ -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 -Nru a/drivers/base/core.c b/drivers/base/core.c
--- a/drivers/base/core.c	Tue Mar  2 19:48:11 2004
+++ b/drivers/base/core.c	Tue Mar  2 19:48:11 2004
@@ -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 -Nru a/drivers/base/driver.c b/drivers/base/driver.c
--- a/drivers/base/driver.c	Tue Mar  2 19:48:11 2004
+++ b/drivers/base/driver.c	Tue Mar  2 19:48:11 2004
@@ -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 -Nru a/drivers/base/power/main.c b/drivers/base/power/main.c
--- a/drivers/base/power/main.c	Tue Mar  2 19:48:11 2004
+++ b/drivers/base/power/main.c	Tue Mar  2 19:48:11 2004
@@ -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 -Nru a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c
--- a/drivers/base/power/shutdown.c	Tue Mar  2 19:48:11 2004
+++ b/drivers/base/power/shutdown.c	Tue Mar  2 19:48:11 2004
@@ -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 @@
 	
 	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 -Nru a/drivers/base/sys.c b/drivers/base/sys.c
--- a/drivers/base/sys.c	Tue Mar  2 19:48:11 2004
+++ b/drivers/base/sys.c	Tue Mar  2 19:48:11 2004
@@ -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>


  reply	other threads:[~2004-03-03  4:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-03  4:14 [BK PATCH] Driver Core update for 2.6.4-rc1 Greg KH
2004-03-03  4:16 ` [PATCH] " Greg KH
2004-03-03  4:16   ` Greg KH
2004-03-03  4:16     ` Greg KH
2004-03-03  4:16       ` Greg KH
2004-03-03  4:16         ` Greg KH
2004-03-03  4:16           ` Greg KH
2004-03-03  4:16             ` Greg KH
2004-03-03  4:16               ` Greg KH
2004-03-03  4:16                 ` Greg KH
2004-03-03  4:16                   ` Greg KH [this message]
2004-03-03 22:24                     ` Russell King
2004-03-03 23:06                       ` Greg KH
2004-03-03  8:00             ` Christoph Hellwig
2004-03-03 15:07               ` Greg KH
2004-03-03 15:13                 ` Christoph Hellwig
2004-03-03 15:19                   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10782873993395@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox