[PATCH] PCI: remove pci_find_device usage from pci sysfs code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeSet 1.2181.16.23, 2005/03/28 15:19:00-08:00, [email protected]

[PATCH] PCI: remove pci_find_device usage from pci sysfs code.

Greg KH wrote:
> On Sun, Mar 20, 2005 at 03:53:58PM +0100, Rolf Eike Beer wrote:
> > Greg KH wrote:
> > > ChangeSet 1.1998.11.23, 2005/02/25 08:26:11-08:00, [email protected]
> > >
> > > PCI: remove pci_find_device usage from pci sysfs code.

> > Any reasons why you are not using "for_each_pci_dev(pdev)" here?
>
> Nope, I forgot it was there :)

Patch is against 2.6.12-rc1-bk1 and does the same think like your one,
except it uses for_each_pci_dev()

Signed-off-by: Rolf Eike Beer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>


 drivers/pci/pci-sysfs.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
--- a/drivers/pci/pci-sysfs.c	2005-04-01 15:31:47 -08:00
+++ b/drivers/pci/pci-sysfs.c	2005-04-01 15:31:47 -08:00
@@ -481,7 +481,7 @@
 	struct pci_dev *pdev = NULL;
 	
 	sysfs_initialized = 1;
-	while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL)
+	for_each_pci_dev(pdev)
 		pci_create_sysfs_dev_files(pdev);
 
 	return 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux