Skip to content

Commit

Permalink
platform/x86: GPD pocket fan: Stop work on suspend
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans de Goede authored and Andy Shevchenko committed Jan 29, 2018
1 parent 594ce6d commit e577868
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/platform/x86/gpd-pocket-fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e577868

Please sign in to comment.