mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
ata: Don't require newlines for link_power_management_policy
sysfs attributes shouldn't require newlines. Make it possible to set the link power management policy without a trailing newline. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
4192be6402
commit
6a74463798
@ -154,8 +154,7 @@ static ssize_t ata_scsi_lpm_put(struct device *dev,
|
||||
*/
|
||||
for (i = 1; i < ARRAY_SIZE(link_pm_policy); i++) {
|
||||
const int len = strlen(link_pm_policy[i].name);
|
||||
if (strncmp(link_pm_policy[i].name, buf, len) == 0 &&
|
||||
buf[len] == '\n') {
|
||||
if (strncmp(link_pm_policy[i].name, buf, len) == 0) {
|
||||
policy = link_pm_policy[i].value;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user