summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/quirks.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-10-16 23:31:10 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 08:43:04 -0700
commita05d0781695566296e74a3670dd5bbd3daf24ae2 (patch)
tree56a474e1011187cd1cdee542dcfa253d64e4a53c /drivers/pnp/quirks.c
parent5bfc43a0b65a11ca1e9edfa0c2bd34ce43da0346 (diff)
downloadlinux-stable-a05d0781695566296e74a3670dd5bbd3daf24ae2.tar.gz
linux-stable-a05d0781695566296e74a3670dd5bbd3daf24ae2.tar.bz2
linux-stable-a05d0781695566296e74a3670dd5bbd3daf24ae2.zip
PNP: use dev_info(), dev_err(), etc in core
If we have the struct pnp_dev available, we can use dev_info(), dev_err(), etc., to give a little more information and consistency. [akpm@linux-foundation.org: fix warning] Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pnp/quirks.c')
-rw-r--r--drivers/pnp/quirks.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index 6b0cf0c2a088..e903b8c2b1fa 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -17,6 +17,7 @@
#include <linux/slab.h>
#include <linux/pnp.h>
#include <linux/io.h>
+#include <linux/kallsyms.h>
#include "base.h"
static void quirk_awe32_resources(struct pnp_dev *dev)
@@ -133,11 +134,18 @@ static struct pnp_fixup pnp_fixups[] = {
void pnp_fixup_device(struct pnp_dev *dev)
{
int i = 0;
+ void (*quirk)(struct pnp_dev *);
while (*pnp_fixups[i].id) {
if (compare_pnp_id(dev->id, pnp_fixups[i].id)) {
- pnp_dbg("Calling quirk for %s", dev->dev.bus_id);
- pnp_fixups[i].quirk_function(dev);
+ quirk = pnp_fixups[i].quirk_function;
+
+#ifdef DEBUG
+ dev_dbg(&dev->dev, "calling quirk 0x%p", quirk);
+ print_fn_descriptor_symbol(": %s()\n",
+ (unsigned long) *quirk);
+#endif
+ (*quirk)(dev);
}
i++;
}