|
@@ -305,6 +305,9 @@ static int num_force_kipmid;
|
|
|
#ifdef CONFIG_PCI
|
|
|
static int pci_registered;
|
|
|
#endif
|
|
|
+#ifdef CONFIG_ACPI
|
|
|
+static int pnp_registered;
|
|
|
+#endif
|
|
|
#ifdef CONFIG_PPC_OF
|
|
|
static int of_registered;
|
|
|
#endif
|
|
@@ -3359,6 +3362,7 @@ static __devinit int init_ipmi_si(void)
|
|
|
|
|
|
#ifdef CONFIG_ACPI
|
|
|
pnp_register_driver(&ipmi_pnp_driver);
|
|
|
+ pnp_registered = 1;
|
|
|
#endif
|
|
|
|
|
|
#ifdef CONFIG_DMI
|
|
@@ -3526,7 +3530,8 @@ static __exit void cleanup_ipmi_si(void)
|
|
|
pci_unregister_driver(&ipmi_pci_driver);
|
|
|
#endif
|
|
|
#ifdef CONFIG_ACPI
|
|
|
- pnp_unregister_driver(&ipmi_pnp_driver);
|
|
|
+ if (pnp_registered)
|
|
|
+ pnp_unregister_driver(&ipmi_pnp_driver);
|
|
|
#endif
|
|
|
|
|
|
#ifdef CONFIG_PPC_OF
|