ACPI / thermal: fix workqueue destroy order
authorAaron Lu <aaron.lu@intel.com>
Mon, 26 May 2014 12:34:07 +0000 (14:34 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 May 2014 12:34:07 +0000 (14:34 +0200)
commit2807bd18cc60ec471917b5158e98e4d7b7e030fb
tree69a1aee01047638ac34d2c83f4e58d41c1c99d03
parent4b660a7f5c8099d88d1a43d8ae138965112592c7
ACPI / thermal: fix workqueue destroy order

When the thermal module is to be removed, we should destroy the wq
acpi_thermal_pm_queue after the ACPI driver's remove callback is
executed as we will need to flush the workqueue there, or a NULL pointer
access will be hit.

Reported-and-tested-by: Kui Zhang <kuizhang@gmail.com>
References: http://www.spinics.net/lists/kernel/msg1747251.html
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/thermal.c