提交 2e4e7a97 编写于 作者: K Kulikov Vasiliy 提交者: David S. Miller

drivers/net/irda: use for_each_pci_dev()

Use for_each_pci_dev() to simplify the code.
Signed-off-by: NKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2037d5aa
......@@ -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;
/*
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册