Skip to content

Commit

Permalink
pci: avoid compiler warning in quirks.c
Browse files Browse the repository at this point in the history
Introduced by commit 5b889bf ("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 <sfr@canb.auug.org.au>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Jan 1, 2010
1 parent c03f6bf commit df9d1e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit df9d1e8

Please sign in to comment.