Skip to content
Commit ef7e7d65 authored by Hanjun Guo's avatar Hanjun Guo Committed by Rafael J. Wysocki
Browse files

cpuidle: sysfs: Accept governor name with 15 characters



CPUIDLE_NAME_LEN is 16, so it's possible to accept governor name
with 15 characters, but now store_current_governor() rejects
governor name with 15 characters as it returns -EINVAL if count
equals CPUIDLE_NAME_LEN.

Refactor the code to accept such case and simplify the code.

Signed-off-by: default avatarHanjun Guo <guohanjun@huawei.com>
Reviewed-by: default avatarDoug Smythies <dsmythies@telus.net>
Tested-by: default avatarDoug Smythies <dsmythies@telus.net>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 3f9f8daa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment