From patchwork Sun Aug 14 21:30:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 1066292 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7ELT6o1004879 for ; Sun, 14 Aug 2011 21:29:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754254Ab1HNV3F (ORCPT ); Sun, 14 Aug 2011 17:29:05 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:41054 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753989Ab1HNV3E (ORCPT ); Sun, 14 Aug 2011 17:29:04 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id B85861B37C0; Sun, 14 Aug 2011 22:51:08 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28068-06; Sun, 14 Aug 2011 22:50:57 +0200 (CEST) Received: from ferrari.rjw.lan (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 70BF11B37B8; Sun, 14 Aug 2011 22:50:57 +0200 (CEST) From: "Rafael J. Wysocki" To: Len Brown Subject: [PATCH] thermal: Prevent polling from happening during system suspend Date: Sun, 14 Aug 2011 23:30:42 +0200 User-Agent: KMail/1.13.6 (Linux/3.1.0-rc1+; KDE/4.6.0; x86_64; ; ) Cc: LKML , ACPI Devel Mailing List , Linux PM mailing list MIME-Version: 1.0 Message-Id: <201108142330.42720.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 14 Aug 2011 21:29:06 +0000 (UTC) From: Rafael J. Wysocki The thermal driver should use a freezable workqueue to schedule polling to prevent thermal_zone_device_update() from being run during system suspend, when the devices it relies on may be inactive. Make it use the system freezable workqueue for this purpose. Signed-off-by: Rafael J. Wysocki --- drivers/thermal/thermal_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux/drivers/thermal/thermal_sys.c =================================================================== --- linux.orig/drivers/thermal/thermal_sys.c +++ linux/drivers/thermal/thermal_sys.c @@ -678,10 +678,10 @@ static void thermal_zone_device_set_poll return; if (delay > 1000) - schedule_delayed_work(&(tz->poll_queue), + queue_delayed_work(system_freezable_wq, &(tz->poll_queue), round_jiffies(msecs_to_jiffies(delay))); else - schedule_delayed_work(&(tz->poll_queue), + queue_delayed_work(system_freezable_wq, &(tz->poll_queue), msecs_to_jiffies(delay)); }