aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/virtual.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c
index a38d42bc8f8f..45ebbc22f470 100644
--- a/drivers/regulator/virtual.c
+++ b/drivers/regulator/virtual.c
@@ -226,6 +226,10 @@ static ssize_t set_mode(struct device *dev, struct device_attribute *attr,
226 unsigned int mode; 226 unsigned int mode;
227 int ret; 227 int ret;
228 228
229 /*
230 * sysfs_streq() doesn't need the \n's, but we add them so the strings
231 * will be shared with show_mode(), above.
232 */
229 if (sysfs_streq(buf, "fast\n") == 0) 233 if (sysfs_streq(buf, "fast\n") == 0)
230 mode = REGULATOR_MODE_FAST; 234 mode = REGULATOR_MODE_FAST;
231 else if (sysfs_streq(buf, "normal\n") == 0) 235 else if (sysfs_streq(buf, "normal\n") == 0)