Commit 4e213c9a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] PCI: remove usage of pci_for_each_dev() in arch/ia64/sn/io/pciba.c

parent a73116a8
...@@ -286,7 +286,7 @@ free_nodes(void) ...@@ -286,7 +286,7 @@ free_nodes(void)
static status __init static status __init
register_with_devfs(void) register_with_devfs(void)
{ {
struct pci_dev * dev; struct pci_dev * dev = NULL;
devfs_handle_t device_dir_handle; devfs_handle_t device_dir_handle;
char devfs_path[40]; char devfs_path[40];
...@@ -297,7 +297,7 @@ register_with_devfs(void) ...@@ -297,7 +297,7 @@ register_with_devfs(void)
/* FIXME: don't forget /dev/pci/mem & /dev/pci/io */ /* FIXME: don't forget /dev/pci/mem & /dev/pci/io */
pci_for_each_dev(dev) { while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
sprintf(devfs_path, "pci/%02x/%02x.%x", sprintf(devfs_path, "pci/%02x/%02x.%x",
dev->bus->number, dev->bus->number,
PCI_SLOT(dev->devfn), PCI_SLOT(dev->devfn),
...@@ -325,14 +325,14 @@ devfn_to_vertex(unsigned char busnum, unsigned int devfn); ...@@ -325,14 +325,14 @@ devfn_to_vertex(unsigned char busnum, unsigned int devfn);
static status __init static status __init
register_with_devfs(void) register_with_devfs(void)
{ {
struct pci_dev * dev; struct pci_dev * dev = NULL;
devfs_handle_t device_dir_handle; devfs_handle_t device_dir_handle;
TRACE(); TRACE();
/* FIXME: don't forget /dev/.../pci/mem & /dev/.../pci/io */ /* FIXME: don't forget /dev/.../pci/mem & /dev/.../pci/io */
pci_for_each_dev(dev) { while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
device_dir_handle = devfn_to_vertex(dev->bus->number, device_dir_handle = devfn_to_vertex(dev->bus->number,
dev->devfn); dev->devfn);
if (device_dir_handle == NULL) if (device_dir_handle == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment