Commit 726a7a3d authored by Rene Herman's avatar Rene Herman Committed by Linus Torvalds

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: default avatarRene Herman <rene.herman@gmail.com>
Tested-by: default avatarUwe Bugla <uwe.bugla@gmx.de>
Acked-by: default avatarUwe Bugla <uwe.bugla@gmx.de>
Acked-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Len Brown <len.brown@intel.com
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 82f55af0
......@@ -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);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment