On Friday 13 February 2009, Felipe Balbi wrote:
> +       if (!strncmp(buf, "run", 3))
> +               lp5521_set_mode(chip, LP5521_MODE_RUN);
> +       else if (!strncmp(buf, "load", 4))
> +               lp5521_set_mode(chip, LP5521_MODE_LOAD);
> +       else if (!strncmp(buf, "direct", 6))
> +               lp5521_set_mode(chip, LP5521_MODE_DIRECT_CONTROL);

Minor nit, which could be addressed by a followon patch:
This is an ideal use-case for using sysfs_streq().

And there's no terminal "else len = -EINVAL" to handle the
case of illegal modes...

- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to