Subject: [PATCH] [acpi thermal] Enable thermal checking on device init and timer events Signed-off-by: Patrick Mochel --- drivers/acpi/drivers/thermal/driver.c | 7 +++++-- drivers/acpi/drivers/thermal/thermal.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) applies-to: 50737598aaa91e2b39f50619ebb6bc0359f07b11 afa0cfb5dfc535df8fa12de060b6271190fb9b24 diff --git a/drivers/acpi/drivers/thermal/driver.c b/drivers/acpi/drivers/thermal/driver.c index 0ca0df8..a6f5ea4 100644 --- a/drivers/acpi/drivers/thermal/driver.c +++ b/drivers/acpi/drivers/thermal/driver.c @@ -101,13 +101,11 @@ static int thermal_init(struct acpi_ther static void thermal_timer(unsigned long data) { -#if 0 struct acpi_thermal * at = (struct acpi_thermal *)data; if (at->t_enabled) acpi_os_queue_for_execution(OSD_PRIORITY_GPE, (acpi_osd_exec_callback)thermal_check, at); -#endif } static void timer_init(struct acpi_thermal * at) @@ -162,6 +160,7 @@ static int thermal_add(struct acpi_dev * dev_set_drvdata(&ad->dev, at); timer_init(at); + thermal_check(at); printk(KERN_INFO PREFIX "thermal [%s] (%ld C)\n", acpi_dev_bid(ad), thermal_temp_c(at->t_temp)); @@ -173,6 +172,10 @@ static int thermal_remove(struct acpi_de { struct acpi_thermal * at = dev_get_drvdata(&ad->dev); + /* + * FIXME: Should we delete policy here? + */ + timer_exit(at); dev_set_drvdata(&ad->dev, NULL); kfree(at); diff --git a/drivers/acpi/drivers/thermal/thermal.h b/drivers/acpi/drivers/thermal/thermal.h index 25f18e1..abe0639 100644 --- a/drivers/acpi/drivers/thermal/thermal.h +++ b/drivers/acpi/drivers/thermal/thermal.h @@ -80,4 +80,6 @@ extern int thermal_get_devices(struct ac extern int thermal_set_cooling_mode(struct acpi_thermal *, int); +extern void thermal_check(struct acpi_thermal * at); + extern long thermal_temp_c(long tempk); --- 0.99.9.GIT