Re: [PATCH 5/6] leds: lp5521: move to drivers/leds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux