Skip to content

Commit

Permalink
cpufreq: cpu-boost: Prevent boost when device device is suspended
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
  • Loading branch information
neobuddy89 authored and khusika committed Jun 15, 2018
1 parent 4f80ac4 commit fb500c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/cpufreq/cpu-boost.c
Expand Up @@ -23,6 +23,9 @@
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/time.h>
#ifdef CONFIG_STATE_NOTIFIER
#include <linux/state_notifier.h>
#endif

#include "../../kernel/sched/sched.h"

Expand Down Expand Up @@ -266,6 +269,11 @@ static void cpuboost_input_event(struct input_handle *handle,
{
u64 now;

#ifdef CONFIG_STATE_NOTIFIER
if (state_suspended)
return;
#endif

if (!input_boost_enabled)
return;

Expand Down

0 comments on commit fb500c7

Please sign in to comment.