Skip to content

Commit

Permalink
drivers/net/irda: use for_each_pci_dev()
Browse files Browse the repository at this point in the history
Use for_each_pci_dev() to simplify the code.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kulikov Vasiliy authored and David S. Miller committed Jul 21, 2010
1 parent 2037d5a commit 2e4e7a9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/irda/smsc-ircc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2848,9 +2848,7 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
unsigned short ss_device = 0x0000;
int ret = 0;

dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);

while (dev != NULL) {
for_each_pci_dev(dev) {
struct smsc_ircc_subsystem_configuration *conf;

/*
Expand Down Expand Up @@ -2899,7 +2897,6 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
ret = -ENODEV;
}
}
dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
}

return ret;
Expand Down

0 comments on commit 2e4e7a9

Please sign in to comment.