summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-01-19 21:47:09 +0100
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-01-29 19:44:16 +0100
commite5778689a9653c0f364efbbd6b9bdd0527e7d8cb (patch)
tree26e5c090bf124109254e5f1e6ab6b8a9e35d4edd /drivers/platform/x86
parentplatform/x86: GPD pocket fan: Use a min-speed of 2 while charging (diff)
downloadlinux-e5778689a9653c0f364efbbd6b9bdd0527e7d8cb.tar.xz
linux-e5778689a9653c0f364efbbd6b9bdd0527e7d8cb.zip
platform/x86: GPD pocket fan: Stop work on suspend
Stop the work on suspend, otherwise it may run between our suspend method running and the system suspending, possibly restarting the fan which we've just stopped. Note we already requeue the work on resume, so that we get a fresh speed at resume. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/gpd-pocket-fan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/gpd-pocket-fan.c b/drivers/platform/x86/gpd-pocket-fan.c
index 2652eb40e5bc..2d645c505f81 100644
--- a/drivers/platform/x86/gpd-pocket-fan.c
+++ b/drivers/platform/x86/gpd-pocket-fan.c
@@ -177,6 +177,7 @@ static int gpd_pocket_fan_suspend(struct device *dev)
{
struct gpd_pocket_fan_data *fan = dev_get_drvdata(dev);
+ cancel_delayed_work_sync(&fan->work);
gpd_pocket_fan_set_speed(fan, gpd_pocket_fan_min_speed());
return 0;
}