#define ACPI_THERMAL_NOTIFY_HOT 0xF1
#define ACPI_THERMAL_MODE_ACTIVE 0x00
#define ACPI_THERMAL_MODE_PASSIVE 0x01
-#define ACPI_THERMAL_MODE_CRT 0xff
+#define ACPI_THERMAL_MODE_CRITICAL 0xff
#define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff"
#define ACPI_THERMAL_MAX_ACTIVE 10
MODULE_LICENSE("GPL");
static int tzp;
-MODULE_PARM(tzp, "i");
+module_param(tzp, int, 0);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
status = acpi_evaluate_integer(tz->handle, "_TMP", NULL, &tz->temperature);
if (ACPI_FAILURE(status))
- return -ENODEV;
+ return_VALUE(-ENODEV);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n", tz->temperature));
if (ACPI_FAILURE(status)) {
tz->trips.critical.flags.valid = 0;
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No critical threshold\n"));
- return -ENODEV;
+ return_VALUE(-ENODEV);
}
else {
tz->trips.critical.flags.valid = 1;
}
end:
- return 0;
+ return_VALUE(0);
}
static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file)
KELVIN_TO_CELSIUS(tz->temperature));
end:
- return 0;
+ return_VALUE(0);
}
static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file)
}
end:
- return 0;
+ return_VALUE(0);
}
static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file)
seq_puts(seq, "<setting not supported>\n");
}
- if ( tz->cooling_mode == ACPI_THERMAL_MODE_CRT )
+ if ( tz->cooling_mode == ACPI_THERMAL_MODE_CRITICAL )
seq_printf(seq, "cooling mode: critical\n");
else
seq_printf(seq, "cooling mode: %s\n",
tz->cooling_mode?"passive":"active");
end:
- return 0;
+ return_VALUE(0);
}
static int acpi_thermal_cooling_open_fs(struct inode *inode, struct file *file)
(tz->polling_frequency / 10));
end:
- return 0;
+ return_VALUE(0);
}
static int acpi_thermal_polling_open_fs(struct inode *inode, struct file *file)
tz->cooling_mode = ACPI_THERMAL_MODE_ACTIVE;
} else {
/* _ACx and _PSV are optional, but _CRT is required */
- tz->cooling_mode = ACPI_THERMAL_MODE_CRT;
+ tz->cooling_mode = ACPI_THERMAL_MODE_CRITICAL;
}
}