vserver 2.0-rc4
[linux-2.6.git] / drivers / acpi / ac.c
index e617af9..e0f498c 100644 (file)
@@ -117,11 +117,11 @@ int acpi_ac_seq_show(struct seq_file *seq, void *offset)
        ACPI_FUNCTION_TRACE("acpi_ac_seq_show");
 
        if (!ac)
-               return 0;
+               return_VALUE(0);
 
        if (acpi_ac_get_state(ac)) {
                seq_puts(seq, "ERROR: Unable to read AC Adapter state\n");
-               return 0;
+               return_VALUE(0);
        }
 
        seq_puts(seq, "state:                   ");
@@ -137,7 +137,7 @@ int acpi_ac_seq_show(struct seq_file *seq, void *offset)
                break;
        }
 
-       return 0;
+       return_VALUE(0);
 }
        
 static int acpi_ac_open_fs(struct inode *inode, struct file *file)
@@ -185,6 +185,9 @@ acpi_ac_remove_fs (
        ACPI_FUNCTION_TRACE("acpi_ac_remove_fs");
 
        if (acpi_device_dir(device)) {
+               remove_proc_entry(ACPI_AC_FILE_STATE,
+                                 acpi_device_dir(device));
+
                remove_proc_entry(acpi_device_bid(device), acpi_ac_dir);
                acpi_device_dir(device) = NULL;
        }
@@ -209,7 +212,7 @@ acpi_ac_notify (
        ACPI_FUNCTION_TRACE("acpi_ac_notify");
 
        if (!ac)
-               return;
+               return_VOID;
 
        if (acpi_bus_get_device(ac->handle, &device))
                return_VOID;