diff options
author | Rene Herman <rene.herman@gmail.com> | 2008-05-15 01:05:33 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-15 04:11:13 +0200 |
commit | 726a7a3d17f183bd0f93daff4d56953c6af78c57 (patch) | |
tree | 93c2a153e8f3ad72a681b8ae5bbd779519859a4f /drivers/pnp/quirks.c | |
parent | fix "lxfb: extend PLL table to support dotclocks below 25 MHz" (diff) | |
download | linux-726a7a3d17f183bd0f93daff4d56953c6af78c57.tar.xz linux-726a7a3d17f183bd0f93daff4d56953c6af78c57.zip |
pnp: clean up pnp_fixup_device()
Make it look a bit more like pci_fixup_device/pci_do_fixups. Also print
the PnP ID and delete the () from the "foo+0x0/0x1234()".
Signed-off-by: Rene Herman <rene.herman@gmail.com>
Tested-by: Uwe Bugla <uwe.bugla@gmx.de>
Acked-by: Uwe Bugla <uwe.bugla@gmx.de>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Len Brown <len.brown@intel.com
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 | 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[] = { 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)) { - quirk = pnp_fixups[i].quirk_function; + struct pnp_fixup *f; + for (f = pnp_fixups; *f->id; f++) { + if (!compare_pnp_id(dev->id, f->id)) + continue; #ifdef DEBUG - dev_dbg(&dev->dev, "calling "); - print_fn_descriptor_symbol("%s()\n", - (unsigned long) *quirk); + dev_dbg(&dev->dev, "%s: calling ", f->id); + print_fn_descriptor_symbol("%s\n", + (unsigned long) f->quirk_function); #endif - (*quirk)(dev); - } - i++; + f->quirk_function(dev); } } |