From 6b1a168b7eab8d66fc50239d9928e72e8ff7718e Mon Sep 17 00:00:00 2001 From: Rama Aparna Mallavarapu Date: Tue, 17 Sep 2019 15:40:55 -0700 Subject: [PATCH] devfreq: Allow bw_hwmon resume with zero resume freq Currently bw_hwmon governor does not allow the device to be resume if the resume_freq is set to zero. But there can be devices that vote for zero frequency when there is no bandwidth on the device. This does not mean that the device should not be resume from suspend. Remove the check with prevents resume, instead add a check in the devfreq framework to check if device is suspended or not before calling the governor resume. Change-Id: Ib82a6a36308aee52e8bb989fddca92265de6c4a4 Signed-off-by: Rama Aparna Mallavarapu [avajid@codeaurora.org: removed suspended check in devfreq framework] Signed-off-by: Amir Vajid --- drivers/devfreq/governor_bw_hwmon.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/devfreq/governor_bw_hwmon.c b/drivers/devfreq/governor_bw_hwmon.c index f78118e32e5b..65d10f69b609 100644 --- a/drivers/devfreq/governor_bw_hwmon.c +++ b/drivers/devfreq/governor_bw_hwmon.c @@ -675,11 +675,6 @@ static int gov_resume(struct devfreq *df) if (!node->hw->resume_hwmon) return -EPERM; - if (!node->resume_freq) { - dev_warn(df->dev.parent, "Governor already resumed!\n"); - return -EBUSY; - } - mutex_lock(&df->lock); update_devfreq(df); mutex_unlock(&df->lock);