diff options
| author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-12-03 08:28:36 -0500 |
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-12-12 17:22:18 -0500 |
| commit | 17a263540cebd4c615755300f34c695b15378a58 (patch) | |
| tree | 6849351c775e7a1f754517dccef519ba17bd2640 | |
| parent | 5955a5966632d0f49cb9418ae437db604db295d9 (diff) | |
tile/PCI: use for_each_pci_dev to simplify the code
Use for_each_pci_dev to simplify the code.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
| -rw-r--r-- | arch/tile/kernel/pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 759822687e8..aac1cd58696 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
| @@ -245,7 +245,7 @@ static void __devinit fixup_read_and_payload_sizes(void) | |||
| 245 | u16 new_values; | 245 | u16 new_values; |
| 246 | 246 | ||
| 247 | /* Scan for the smallest maximum payload size. */ | 247 | /* Scan for the smallest maximum payload size. */ |
| 248 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 248 | for_each_pci_dev(dev) { |
| 249 | u32 devcap; | 249 | u32 devcap; |
| 250 | int max_payload; | 250 | int max_payload; |
| 251 | 251 | ||
| @@ -260,7 +260,7 @@ static void __devinit fixup_read_and_payload_sizes(void) | |||
| 260 | 260 | ||
| 261 | /* Now, set the max_payload_size for all devices to that value. */ | 261 | /* Now, set the max_payload_size for all devices to that value. */ |
| 262 | new_values = (max_read_size << 12) | (smallest_max_payload << 5); | 262 | new_values = (max_read_size << 12) | (smallest_max_payload << 5); |
| 263 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) | 263 | for_each_pci_dev(dev) |
| 264 | pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL, | 264 | pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL, |
| 265 | PCI_EXP_DEVCTL_PAYLOAD | PCI_EXP_DEVCTL_READRQ, | 265 | PCI_EXP_DEVCTL_PAYLOAD | PCI_EXP_DEVCTL_READRQ, |
| 266 | new_values); | 266 | new_values); |
