ACPI: fix acpi_driver.name usage
[safe/jmp/linux-2.6] / drivers / acpi / fan.c
index c413e69..5ac727e 100644 (file)
 #define ACPI_FAN_FILE_STATE            "state"
 
 #define _COMPONENT             ACPI_FAN_COMPONENT
-ACPI_MODULE_NAME("acpi_fan")
+ACPI_MODULE_NAME("fan");
 
-    MODULE_AUTHOR("Paul Diefenbaugh");
+MODULE_AUTHOR("Paul Diefenbaugh");
 MODULE_DESCRIPTION(ACPI_FAN_DRIVER_NAME);
 MODULE_LICENSE("GPL");
 
 static int acpi_fan_add(struct acpi_device *device);
 static int acpi_fan_remove(struct acpi_device *device, int type);
-static int acpi_fan_suspend(struct acpi_device *device, int state);
-static int acpi_fan_resume(struct acpi_device *device, int state);
+static int acpi_fan_suspend(struct acpi_device *device, pm_message_t state);
+static int acpi_fan_resume(struct acpi_device *device);
 
 static struct acpi_driver acpi_fan_driver = {
-       .name = ACPI_FAN_DRIVER_NAME,
+       .name = "fan",
        .class = ACPI_FAN_CLASS,
        .ids = "PNP0C0B",
        .ops = {
@@ -186,10 +186,9 @@ static int acpi_fan_add(struct acpi_device *device)
        if (!device)
                return -EINVAL;
 
-       fan = kmalloc(sizeof(struct acpi_fan), GFP_KERNEL);
+       fan = kzalloc(sizeof(struct acpi_fan), GFP_KERNEL);
        if (!fan)
                return -ENOMEM;
-       memset(fan, 0, sizeof(struct acpi_fan));
 
        fan->device = device;
        strcpy(acpi_device_name(device), "Fan");
@@ -238,7 +237,7 @@ static int acpi_fan_remove(struct acpi_device *device, int type)
        return 0;
 }
 
-static int acpi_fan_suspend(struct acpi_device *device, int state)
+static int acpi_fan_suspend(struct acpi_device *device, pm_message_t state)
 {
        if (!device)
                return -EINVAL;
@@ -248,7 +247,7 @@ static int acpi_fan_suspend(struct acpi_device *device, int state)
        return AE_OK;
 }
 
-static int acpi_fan_resume(struct acpi_device *device, int state)
+static int acpi_fan_resume(struct acpi_device *device)
 {
        int result = 0;
        int power_state = 0;