Skip to content

Commit

Permalink
drivers: base: print rejected matches with DEBUG_DRIVER
Browse files Browse the repository at this point in the history
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@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Wolfram Sang authored and Greg Kroah-Hartman committed Sep 26, 2011
1 parent 54f23eb commit bcbe4f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/base/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ static int really_probe(struct device *dev, struct device_driver *drv)
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
Expand Down

0 comments on commit bcbe4f9

Please sign in to comment.