PM / Sleep: Fix a mistake in a conditional in autosleep_store()

The condition check in autosleep_store() is incorrect and prevents
/sys/power/autosleep from working as advertised.  Fix that.

[rjw: Added the changelog.]

Change-Id: I231cc24fc3f245003dcf5053ff6a71eb69ffa273
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Git-commit: 040e5bf65e1ee66266bc314c5965518a7c21ff36
Git-repo: git://codeaurora.org/kernel/msm.git
Signed-off-by: Anurag Singh <anursing@codeaurora.org>
This commit is contained in:
Arve Hjønnevåg
2013-03-22 15:18:30 -07:00
committed by Anurag Singh
parent 9d922e9072
commit 7b723da261
+1 -1
View File
@@ -511,7 +511,7 @@ static ssize_t autosleep_store(struct kobject *kobj,
int error;
if (state == PM_SUSPEND_ON
&& !(strncmp(buf, "off", 3) && strncmp(buf, "off\n", 4)))
&& strcmp(buf, "off") && strcmp(buf, "off\n"))
return -EINVAL;
error = pm_autosleep_set_state(state);