Skip to content
Snippets Groups Projects
Commit aa61d558 authored by Mike Rapoport's avatar Mike Rapoport Committed by Liam Girdwood
Browse files

regulator/virtual: fix strings compare predicates

parent 53032daf
No related branches found
No related tags found
No related merge requests found
...@@ -230,13 +230,13 @@ static ssize_t set_mode(struct device *dev, struct device_attribute *attr, ...@@ -230,13 +230,13 @@ static ssize_t set_mode(struct device *dev, struct device_attribute *attr,
* sysfs_streq() doesn't need the \n's, but we add them so the strings * sysfs_streq() doesn't need the \n's, but we add them so the strings
* will be shared with show_mode(), above. * will be shared with show_mode(), above.
*/ */
if (sysfs_streq(buf, "fast\n") == 0) if (sysfs_streq(buf, "fast\n"))
mode = REGULATOR_MODE_FAST; mode = REGULATOR_MODE_FAST;
else if (sysfs_streq(buf, "normal\n") == 0) else if (sysfs_streq(buf, "normal\n"))
mode = REGULATOR_MODE_NORMAL; mode = REGULATOR_MODE_NORMAL;
else if (sysfs_streq(buf, "idle\n") == 0) else if (sysfs_streq(buf, "idle\n"))
mode = REGULATOR_MODE_IDLE; mode = REGULATOR_MODE_IDLE;
else if (sysfs_streq(buf, "standby\n") == 0) else if (sysfs_streq(buf, "standby\n"))
mode = REGULATOR_MODE_STANDBY; mode = REGULATOR_MODE_STANDBY;
else { else {
dev_err(dev, "Configuring invalid mode\n"); dev_err(dev, "Configuring invalid mode\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment