diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2007-10-17 02:31:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:43:04 -0400 |
commit | a05d0781695566296e74a3670dd5bbd3daf24ae2 (patch) | |
tree | 56a474e1011187cd1cdee542dcfa253d64e4a53c /drivers/pnp/quirks.c | |
parent | 5bfc43a0b65a11ca1e9edfa0c2bd34ce43da0346 (diff) |
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.c | 12 |
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 @@ | |||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/pnp.h> | 18 | #include <linux/pnp.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/kallsyms.h> | ||
20 | #include "base.h" | 21 | #include "base.h" |
21 | 22 | ||
22 | static void quirk_awe32_resources(struct pnp_dev *dev) | 23 | static void quirk_awe32_resources(struct pnp_dev *dev) |
@@ -133,11 +134,18 @@ static struct pnp_fixup pnp_fixups[] = { | |||
133 | void pnp_fixup_device(struct pnp_dev *dev) | 134 | void pnp_fixup_device(struct pnp_dev *dev) |
134 | { | 135 | { |
135 | int i = 0; | 136 | int i = 0; |
137 | void (*quirk)(struct pnp_dev *); | ||
136 | 138 | ||
137 | while (*pnp_fixups[i].id) { | 139 | while (*pnp_fixups[i].id) { |
138 | if (compare_pnp_id(dev->id, pnp_fixups[i].id)) { | 140 | if (compare_pnp_id(dev->id, pnp_fixups[i].id)) { |
139 | pnp_dbg("Calling quirk for %s", dev->dev.bus_id); | 141 | quirk = pnp_fixups[i].quirk_function; |
140 | pnp_fixups[i].quirk_function(dev); | 142 | |
143 | #ifdef DEBUG | ||
144 | dev_dbg(&dev->dev, "calling quirk 0x%p", quirk); | ||
145 | print_fn_descriptor_symbol(": %s()\n", | ||
146 | (unsigned long) *quirk); | ||
147 | #endif | ||
148 | (*quirk)(dev); | ||
141 | } | 149 | } |
142 | i++; | 150 | i++; |
143 | } | 151 | } |