vserver 2.0 rc7
[linux-2.6.git] / drivers / acpi / fan.c
index 2c5422d..14192ee 100644 (file)
@@ -50,8 +50,8 @@ MODULE_AUTHOR("Paul Diefenbaugh");
 MODULE_DESCRIPTION(ACPI_FAN_DRIVER_NAME);
 MODULE_LICENSE("GPL");
 
-int acpi_fan_add (struct acpi_device *device);
-int acpi_fan_remove (struct acpi_device *device, int type);
+static int acpi_fan_add (struct acpi_device *device);
+static int acpi_fan_remove (struct acpi_device *device, int type);
 
 static struct acpi_driver acpi_fan_driver = {
        .name =         ACPI_FAN_DRIVER_NAME,
@@ -72,27 +72,24 @@ struct acpi_fan {
                               FS Interface (/proc)
    -------------------------------------------------------------------------- */
 
-struct proc_dir_entry          *acpi_fan_dir;
+static struct proc_dir_entry   *acpi_fan_dir;
 
 
 static int
 acpi_fan_read_state (struct seq_file *seq, void *offset)
 {
-       struct acpi_fan         *fan = (struct acpi_fan *) seq->private;
+       struct acpi_fan         *fan = seq->private;
        int                     state = 0;
 
        ACPI_FUNCTION_TRACE("acpi_fan_read_state");
 
-       if (!fan)
-               goto end;
-
-       if (acpi_bus_get_power(fan->handle, &state))
-               goto end;
-
-       seq_printf(seq, "status:                  %s\n",
-               !state?"on":"off");
-
-end:
+       if (fan) {
+               if (acpi_bus_get_power(fan->handle, &state))
+                       seq_printf(seq, "status:                  ERROR\n");
+               else
+                       seq_printf(seq, "status:                  %s\n",
+                                    !state?"on":"off");
+       }
        return_VALUE(0);
 }
 
@@ -197,7 +194,7 @@ acpi_fan_remove_fs (
                                  Driver Interface
    -------------------------------------------------------------------------- */
 
-int
+static int
 acpi_fan_add (
        struct acpi_device      *device)
 {
@@ -243,7 +240,7 @@ end:
 }
 
 
-int
+static int
 acpi_fan_remove (
        struct acpi_device      *device,
        int                     type)
@@ -265,7 +262,7 @@ acpi_fan_remove (
 }
 
 
-int __init
+static int __init
 acpi_fan_init (void)
 {
        int                     result = 0;
@@ -287,7 +284,7 @@ acpi_fan_init (void)
 }
 
 
-void __exit
+static void __exit
 acpi_fan_exit (void)
 {
        ACPI_FUNCTION_TRACE("acpi_fan_exit");