[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1316540477-21383-1-git-send-email-w.sang@pengutronix.de>
Date: Tue, 20 Sep 2011 19:41:17 +0200
From: Wolfram Sang <w.sang@...gutronix.de>
To: linux-kernel@...r.kernel.org
Cc: Wolfram Sang <w.sang@...gutronix.de>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: [PATCH] drivers: base: print rejected matches with DEBUG_DRIVER
When DEBUG_DRIVER is activated, be verbose and explicitly state when a
device<->driver match was rejected by the probe-function of the driver.
Now all code-paths report what is currently happening which helps
debugging, because you don't have to remember that no printout means
the match is rejected (and then you still don't know if it was because
of ENODEV or ENXIO).
Signed-off-by: Wolfram Sang <w.sang@...gutronix.de>
Cc: Greg Kroah-Hartman <gregkh@...e.de>
---
Patch is tested on a ppc-based MPC5121 board with 3.1-rc6
drivers/base/dd.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 6658da7..142e3d600 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -147,6 +147,9 @@ probe_failed:
printk(KERN_WARNING
"%s: probe of %s failed with error %d\n",
drv->name, dev_name(dev), ret);
+ } else {
+ pr_debug("%s: probe of %s rejects match %d\n",
+ drv->name, dev_name(dev), ret);
}
/*
* Ignore errors returned by ->probe so that the next driver can try
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists