diff options
author | Matthew Garrett <mjg@redhat.com> | 2009-11-17 11:09:03 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-12-03 02:46:35 -0500 |
commit | 6a74463798bde03f849d8d82d97e4f8e4cf160f3 (patch) | |
tree | cd8b35f3c8dd92b816a79e8a1d3272fb7521cd9e | |
parent | 4192be64026dd8bfe94970846e4a135e531bd116 (diff) |
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>
-rw-r--r-- | drivers/ata/libata-scsi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index b4ee28dec521..512a3ee8caf6 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -154,8 +154,7 @@ static ssize_t ata_scsi_lpm_put(struct device *dev, | |||
154 | */ | 154 | */ |
155 | for (i = 1; i < ARRAY_SIZE(link_pm_policy); i++) { | 155 | for (i = 1; i < ARRAY_SIZE(link_pm_policy); i++) { |
156 | const int len = strlen(link_pm_policy[i].name); | 156 | const int len = strlen(link_pm_policy[i].name); |
157 | if (strncmp(link_pm_policy[i].name, buf, len) == 0 && | 157 | if (strncmp(link_pm_policy[i].name, buf, len) == 0) { |
158 | buf[len] == '\n') { | ||
159 | policy = link_pm_policy[i].value; | 158 | policy = link_pm_policy[i].value; |
160 | break; | 159 | break; |
161 | } | 160 | } |