aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/quirks.c
diff options
context:
space:
mode:
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 @@
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
22static void quirk_awe32_resources(struct pnp_dev *dev) 23static void quirk_awe32_resources(struct pnp_dev *dev)
@@ -133,11 +134,18 @@ static struct pnp_fixup pnp_fixups[] = {
133void pnp_fixup_device(struct pnp_dev *dev) 134void 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 }