aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/setup-pci.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-12 17:31:57 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-12 17:31:57 -0500
commit1b7d3477a7b0d52406d68b01bc8931f43112677f (patch)
treeb20473ba546f53bb361e1e29c37a6836be20c977 /drivers/ide/setup-pci.c
parent125a8191dcbc927441263a332826989cc2925681 (diff)
ide: coding style fixes for drivers/ide/setup-pci.c
* remove trailing whitespaces * 'if()' -> 'if ()' * remove extra new-line before EXPORT_SYMBOL_GPL() * add extra new-line after 'id' definition * respect 80-columns limit There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r--drivers/ide/setup-pci.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 708e01d8a9de..d2cd5a3d38f8 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -704,7 +704,7 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_devices);
704/* 704/*
705 * Module interfaces 705 * Module interfaces
706 */ 706 */
707 707
708static int pre_init = 1; /* Before first ordered IDE scan */ 708static int pre_init = 1; /* Before first ordered IDE scan */
709static LIST_HEAD(ide_pci_drivers); 709static LIST_HEAD(ide_pci_drivers);
710 710
@@ -714,7 +714,7 @@ static LIST_HEAD(ide_pci_drivers);
714 * @module: owner module of the driver 714 * @module: owner module of the driver
715 * 715 *
716 * Registers a driver with the IDE layer. The IDE layer arranges that 716 * Registers a driver with the IDE layer. The IDE layer arranges that
717 * boot time setup is done in the expected device order and then 717 * boot time setup is done in the expected device order and then
718 * hands the controllers off to the core PCI code to do the rest of 718 * hands the controllers off to the core PCI code to do the rest of
719 * the work. 719 * the work.
720 * 720 *
@@ -724,13 +724,12 @@ static LIST_HEAD(ide_pci_drivers);
724int __ide_pci_register_driver(struct pci_driver *driver, struct module *module, 724int __ide_pci_register_driver(struct pci_driver *driver, struct module *module,
725 const char *mod_name) 725 const char *mod_name)
726{ 726{
727 if(!pre_init) 727 if (!pre_init)
728 return __pci_register_driver(driver, module, mod_name); 728 return __pci_register_driver(driver, module, mod_name);
729 driver->driver.owner = module; 729 driver->driver.owner = module;
730 list_add_tail(&driver->node, &ide_pci_drivers); 730 list_add_tail(&driver->node, &ide_pci_drivers);
731 return 0; 731 return 0;
732} 732}
733
734EXPORT_SYMBOL_GPL(__ide_pci_register_driver); 733EXPORT_SYMBOL_GPL(__ide_pci_register_driver);
735 734
736/** 735/**
@@ -741,17 +740,18 @@ EXPORT_SYMBOL_GPL(__ide_pci_register_driver);
741 * This is only used during boot up to get the ordering correct. After 740 * This is only used during boot up to get the ordering correct. After
742 * boot up the pci layer takes over the job. 741 * boot up the pci layer takes over the job.
743 */ 742 */
744 743
745static int __init ide_scan_pcidev(struct pci_dev *dev) 744static int __init ide_scan_pcidev(struct pci_dev *dev)
746{ 745{
747 struct list_head *l; 746 struct list_head *l;
748 struct pci_driver *d; 747 struct pci_driver *d;
749 748
750 list_for_each(l, &ide_pci_drivers) { 749 list_for_each(l, &ide_pci_drivers) {
751 d = list_entry(l, struct pci_driver, node); 750 d = list_entry(l, struct pci_driver, node);
752 if (d->id_table) { 751 if (d->id_table) {
753 const struct pci_device_id *id = pci_match_id(d->id_table, 752 const struct pci_device_id *id =
754 dev); 753 pci_match_id(d->id_table, dev);
754
755 if (id != NULL && d->probe(dev, id) >= 0) { 755 if (id != NULL && d->probe(dev, id) >= 0) {
756 dev->driver = d; 756 dev->driver = d;
757 pci_dev_get(dev); 757 pci_dev_get(dev);
@@ -779,13 +779,13 @@ void __init ide_scan_pcibus (int scan_direction)
779 779
780 pre_init = 0; 780 pre_init = 0;
781 if (!scan_direction) 781 if (!scan_direction)
782 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) 782 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)))
783 ide_scan_pcidev(dev); 783 ide_scan_pcidev(dev);
784 else 784 else
785 while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, dev)) 785 while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID,
786 != NULL) 786 dev)))
787 ide_scan_pcidev(dev); 787 ide_scan_pcidev(dev);
788 788
789 /* 789 /*
790 * Hand the drivers over to the PCI layer now we 790 * Hand the drivers over to the PCI layer now we
791 * are post init. 791 * are post init.