Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64833
b: refs/heads/master
c: 0505b55
h: refs/heads/master
i:
  64831: d4717b5
v: v3
  • Loading branch information
Sergei Shtylyov authored and Bartlomiej Zolnierkiewicz committed Sep 11, 2007
1 parent 6df64cd commit 5ca169c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc4b6fd620aec395048b2877daca87ba7bfcd5e0
refs/heads/master: 0505b55fb51fa289027f33ae793995c191277536
41 changes: 16 additions & 25 deletions trunk/drivers/ide/setup-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,19 +816,15 @@ static int __init ide_scan_pcidev(struct pci_dev *dev)
struct list_head *l;
struct pci_driver *d;

list_for_each(l, &ide_pci_drivers)
{
list_for_each(l, &ide_pci_drivers) {
d = list_entry(l, struct pci_driver, node);
if(d->id_table)
{
const struct pci_device_id *id = pci_match_id(d->id_table, dev);
if(id != NULL)
{
if(d->probe(dev, id) >= 0)
{
dev->driver = d;
return 1;
}
if (d->id_table) {
const struct pci_device_id *id = pci_match_id(d->id_table,
dev);
if (id != NULL && d->probe(dev, id) >= 0) {
dev->driver = d;
pci_dev_get(dev);
return 1;
}
}
}
Expand All @@ -851,15 +847,13 @@ void __init ide_scan_pcibus (int scan_direction)
struct list_head *l, *n;

pre_init = 0;
if (!scan_direction) {
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
if (!scan_direction)
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
ide_scan_pcidev(dev);
}
} else {
while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
else
while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, dev))
!= NULL)
ide_scan_pcidev(dev);
}
}

/*
* Hand the drivers over to the PCI layer now we
Expand All @@ -869,12 +863,9 @@ void __init ide_scan_pcibus (int scan_direction)
list_for_each_safe(l, n, &ide_pci_drivers) {
list_del(l);
d = list_entry(l, struct pci_driver, node);
if (__pci_register_driver(d, d->driver.owner,
d->driver.mod_name)) {
printk(KERN_ERR "%s: failed to register driver "
"for %s\n", __FUNCTION__,
d->driver.mod_name);
}
if (__pci_register_driver(d, d->driver.owner, d->driver.mod_name))
printk(KERN_ERR "%s: failed to register driver for %s\n",
__FUNCTION__, d->driver.mod_name);
}
}
#endif

0 comments on commit 5ca169c

Please sign in to comment.