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,
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);
}
Driver Interface
-------------------------------------------------------------------------- */
-int
+static int
acpi_fan_add (
struct acpi_device *device)
{
}
-int
+static int
acpi_fan_remove (
struct acpi_device *device,
int type)
}
-int __init
+static int __init
acpi_fan_init (void)
{
int result = 0;
}
-void __exit
+static void __exit
acpi_fan_exit (void)
{
ACPI_FUNCTION_TRACE("acpi_fan_exit");