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

From: Matthew Garrett
Date: Tue Apr 20 2010 - 14:41:35 EST


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

Signed-off-by: Matthew Garrett <mjg@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/