diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-16 18:46:08 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-22 13:34:38 -0400 |
| commit | 0a4af1473a7d81fc90e195fb5b241ab5fcf933ca (patch) | |
| tree | e50e3a65fd1b3ce0e3bcade67ff6b4cae9f8c641 /drivers/char/agp | |
| parent | 0b79ca2a800d1a2ed0386886c8358217f3371592 (diff) | |
sgi-agp: Use list_for_each_entry() for bus->devices traversal
Replace list_for_each() + pci_dev_b() with the simpler
list_for_each_entry().
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
CC: David Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/agp')
| -rw-r--r-- | drivers/char/agp/sgi-agp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index 192000377737..3a5af2f9b015 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c | |||
| @@ -289,12 +289,11 @@ static int __devinit agp_sgi_init(void) | |||
| 289 | 289 | ||
| 290 | j = 0; | 290 | j = 0; |
| 291 | list_for_each_entry(info, &tioca_list, ca_list) { | 291 | list_for_each_entry(info, &tioca_list, ca_list) { |
| 292 | struct list_head *tmp; | ||
| 293 | if (list_empty(info->ca_devices)) | 292 | if (list_empty(info->ca_devices)) |
| 294 | continue; | 293 | continue; |
| 295 | list_for_each(tmp, info->ca_devices) { | 294 | list_for_each_entry(pdev, info->ca_devices, bus_list) { |
| 296 | u8 cap_ptr; | 295 | u8 cap_ptr; |
| 297 | pdev = pci_dev_b(tmp); | 296 | |
| 298 | if (pdev->class != (PCI_CLASS_DISPLAY_VGA << 8)) | 297 | if (pdev->class != (PCI_CLASS_DISPLAY_VGA << 8)) |
| 299 | continue; | 298 | continue; |
| 300 | cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP); | 299 | cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP); |
