diff options
Diffstat (limited to 'drivers/pnp/quirks.c')
-rw-r--r-- | drivers/pnp/quirks.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index d049a2279fea..a1af2f989482 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c | |||
@@ -212,20 +212,16 @@ static struct pnp_fixup pnp_fixups[] = { | |||
212 | 212 | ||
213 | void pnp_fixup_device(struct pnp_dev *dev) | 213 | void pnp_fixup_device(struct pnp_dev *dev) |
214 | { | 214 | { |
215 | int i = 0; | 215 | struct pnp_fixup *f; |
216 | void (*quirk)(struct pnp_dev *); | ||
217 | |||
218 | while (*pnp_fixups[i].id) { | ||
219 | if (compare_pnp_id(dev->id, pnp_fixups[i].id)) { | ||
220 | quirk = pnp_fixups[i].quirk_function; | ||
221 | 216 | ||
217 | for (f = pnp_fixups; *f->id; f++) { | ||
218 | if (!compare_pnp_id(dev->id, f->id)) | ||
219 | continue; | ||
222 | #ifdef DEBUG | 220 | #ifdef DEBUG |
223 | dev_dbg(&dev->dev, "calling "); | 221 | dev_dbg(&dev->dev, "%s: calling ", f->id); |
224 | print_fn_descriptor_symbol("%s()\n", | 222 | print_fn_descriptor_symbol("%s\n", |
225 | (unsigned long) *quirk); | 223 | (unsigned long) f->quirk_function); |
226 | #endif | 224 | #endif |
227 | (*quirk)(dev); | 225 | f->quirk_function(dev); |
228 | } | ||
229 | i++; | ||
230 | } | 226 | } |
231 | } | 227 | } |