pci: avoid compiler warning in quirks.c
authorLinus Torvalds <[email protected]>
Fri, 1 Jan 2010 00:44:43 +0000 (16:44 -0800)
committerLinus Torvalds <[email protected]>
Fri, 1 Jan 2010 00:44:43 +0000 (16:44 -0800)
Introduced by commit 5b889bf23 ("PCI: Fix build if quirks are not
enabled"), which made the pci_dev_reset_methods[] array static and
'const', but didn't then change the code to match, and use a const
pointer when moving it to quirks.c.

Trivially fixed by just adding the required 'const' to the iterator
variable.

Reported-by: Stephen Rothwell <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/pci/quirks.c

index 5c449fc4db19e408b51cd3fd3983e31b20f45fbf..c74694345b6ea6321fe643c2720c86812220f363 100644 (file)
@@ -2694,7 +2694,7 @@ static const struct pci_dev_reset_methods pci_dev_reset_methods[] = {
 
 int pci_dev_specific_reset(struct pci_dev *dev, int probe)
 {
-       struct pci_dev_reset_methods *i;
+       const struct pci_dev_reset_methods *i;
 
        for (i = pci_dev_reset_methods; i->reset; i++) {
                if ((i->vendor == dev->vendor ||