提交 040e5bf6 编写于 作者: A Arve Hjønnevåg 提交者: Rafael J. Wysocki

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.]
Signed-off-by: NArve Hjønnevåg <arve@android.com>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
上级 4d7e30d9
...@@ -422,7 +422,7 @@ static ssize_t autosleep_store(struct kobject *kobj, ...@@ -422,7 +422,7 @@ static ssize_t autosleep_store(struct kobject *kobj,
int error; int error;
if (state == PM_SUSPEND_ON if (state == PM_SUSPEND_ON
&& !(strncmp(buf, "off", 3) && strncmp(buf, "off\n", 4))) && strcmp(buf, "off") && strcmp(buf, "off\n"))
return -EINVAL; return -EINVAL;
error = pm_autosleep_set_state(state); error = pm_autosleep_set_state(state);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册