instead of using strcmp() for comparing strings,
use sysfs_streq().
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
- if (!strncmp(buf, "run", 3))
+ if (sysfs_streq(buf, "run"))
lp5521_set_mode(chip, LP5521_MODE_RUN);
lp5521_set_mode(chip, LP5521_MODE_RUN);
- else if (!strncmp(buf, "load", 4))
+ else if (sysfs_streq(buf, "load"))
lp5521_set_mode(chip, LP5521_MODE_LOAD);
lp5521_set_mode(chip, LP5521_MODE_LOAD);
- else if (!strncmp(buf, "direct", 6))
+ else if (sysfs_streq(buf, "direct"))
lp5521_set_mode(chip, LP5521_MODE_DIRECT_CONTROL);
lp5521_set_mode(chip, LP5521_MODE_DIRECT_CONTROL);
mutex_unlock(&chip->lock);
mutex_unlock(&chip->lock);