@@ -355,12 +355,13 @@ static int __init acpi_fan_init(void)
#endif
result = acpi_bus_register_driver(&acpi_fan_driver);
- if (result < 0) {
+
+#ifdef CONFIG_ACPI_PROCFS
+ if (result < 0)
remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir);
- return -ENODEV;
- }
+#endif
- return 0;
+ return result;
}
static void __exit acpi_fan_exit(void)
@@ -368,7 +369,9 @@ static void __exit acpi_fan_exit(void)
acpi_bus_unregister_driver(&acpi_fan_driver);
+#ifdef CONFIG_ACPI_PROCFS
remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir);
+#endif
return;
}