Skip to contentSkip to conversation

arch/i386/pci/acpi.c Use for_each_pci_dev macro

PATCH In review [email protected] 2 participants 2 messages Mar 5, 2005 – Mar 7, 2005 1 message not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/i386/pci/acpi.c Use for_each_pci_dev macro

Using the new for_each_pci_dev macro. Compiled and boot tested.

---

 kj-domen/arch/i386/pci/acpi.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/i386/pci/acpi.c renamed from arch/i386/pci/acpi.c~for-each-pci-dev-arch_i386_pci_acpi +1 -1
diff -puN arch/i386/pci/acpi.c~for-each-pci-dev-arch_i386_pci_acpi arch/i386/pci/acpi.c
@@ -41,7 +41,7 @@ static int __init pci_acpi_init(void)
 		printk(KERN_INFO "** was specified.  If this was required to make a driver work,\n");
 		printk(KERN_INFO "** please email the output of \"lspci\" to [email protected]\n");
 		printk(KERN_INFO "** so I can fix the driver.\n");
-		while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
+		for_each_pci_dev(dev)
 			acpi_pci_irq_enable(dev);
 	} else {
 		printk(KERN_INFO "** PCI interrupts are no longer routed automatically.  If this\n");

_

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

A message that is not in the archive (sent off-list or not yet received): 20050305152937.6C73F1EE1E-FMNAFCfKBdkof1z7V/[email protected]

#2 lore raw
Quoted 23 lines · On Sat, 2005-03-05 at 16:29 +0100, [email protected]…

Using the new for_each_pci_dev macro. Compiled and boot tested.

---

 kj-domen/arch/i386/pci/acpi.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/i386/pci/acpi.c~for-each-pci-dev-arch_i386_pci_acpi arch/i386/pci/acpi.c

arch/i386/pci/acpi.c renamed from arch/i386/pci/acpi.c~for-each-pci-dev-arch_i386_pci_acpi +1 -1
@@ -41,7 +41,7 @@ static int __init pci_acpi_init(void)
 		printk(KERN_INFO "** was specified.  If this was required to make a driver work,\n");
 		printk(KERN_INFO "** please email the output of \"lspci\" to [email protected]\n");
 		printk(KERN_INFO "** so I can fix the driver.\n");
-		while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
+		for_each_pci_dev(dev)
 			acpi_pci_irq_enable(dev);
 	} else {
 		printk(KERN_INFO "** PCI interrupts are no longer routed automatically.  If this\n");
Quoted 3 lines

_

This looks OK to me, but the patch will need to be updated because Linus just applied my patch to change the printk message preceeding your change.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click