Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74921
b: refs/heads/master
c: 1b7d347
h: refs/heads/master
i:
  74919: 34ac5bb
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Dec 12, 2007
1 parent 438a79e commit d5c0c4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 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: 125a8191dcbc927441263a332826989cc2925681
refs/heads/master: 1b7d3477a7b0d52406d68b01bc8931f43112677f
24 changes: 12 additions & 12 deletions trunk/drivers/ide/setup-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_devices);
/*
* Module interfaces
*/

static int pre_init = 1; /* Before first ordered IDE scan */
static LIST_HEAD(ide_pci_drivers);

Expand All @@ -714,7 +714,7 @@ static LIST_HEAD(ide_pci_drivers);
* @module: owner module of the driver
*
* Registers a driver with the IDE layer. The IDE layer arranges that
* boot time setup is done in the expected device order and then
* boot time setup is done in the expected device order and then
* hands the controllers off to the core PCI code to do the rest of
* the work.
*
Expand All @@ -724,13 +724,12 @@ static LIST_HEAD(ide_pci_drivers);
int __ide_pci_register_driver(struct pci_driver *driver, struct module *module,
const char *mod_name)
{
if(!pre_init)
if (!pre_init)
return __pci_register_driver(driver, module, mod_name);
driver->driver.owner = module;
list_add_tail(&driver->node, &ide_pci_drivers);
return 0;
}

EXPORT_SYMBOL_GPL(__ide_pci_register_driver);

/**
Expand All @@ -741,17 +740,18 @@ EXPORT_SYMBOL_GPL(__ide_pci_register_driver);
* This is only used during boot up to get the ordering correct. After
* boot up the pci layer takes over the job.
*/

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) {
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);
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);
Expand Down Expand Up @@ -779,13 +779,13 @@ void __init ide_scan_pcibus (int scan_direction)

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

/*
* Hand the drivers over to the PCI layer now we
* are post init.
Expand Down

0 comments on commit d5c0c4d

Please sign in to comment.