[PATCH 3/3] ipmi: Change device discovery order

Matthew Garrett
2010-04-20T18:41:31Z

The ipmi spec provides an ordering for si discovery. Change the driver
to match.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
drivers/char/ipmi/ipmi_si_intf.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 95af023..a36cab1 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -3301,23 +3301,24 @@ static __devinit int init_ipmi_si(void)
}
mutex_unlock(&smi_infos_lock);

-#ifdef CONFIG_DMI
- dmi_find_bmc();
+#ifdef CONFIG_PCI
+ rv = pci_register_driver(&ipmi_pci_driver);
+ if (rv)
+ printk(KERN_ERR
+ "init_ipmi_si: Unable to register PCI driver: %d\n",
+ rv);
#endif

#ifdef CONFIG_ACPI
- spmi_find_bmc();
+ pnp_register_driver(&ipmi_pnp_driver);
#endif
+
#ifdef CONFIG_ACPI
- pnp_register_driver(&ipmi_pnp_driver);
+ spmi_find_bmc();
#endif

-#ifdef CONFIG_PCI
- rv = pci_register_driver(&ipmi_pci_driver);
- if (rv)
- printk(KERN_ERR
- "init_ipmi_si: Unable to register PCI driver: %d\n",
- rv);
+#ifdef CONFIG_DMI
+ dmi_find_bmc();
#endif

#ifdef CONFIG_PPC_OF
--
1.6.5.2