On Tuesday 10 February 2009, Felipe Balbi wrote:
> +       chip->ledr.name = "lp5521:red";

Rule of thumb: assume there can always be multiple instances
of a device.  In this case that's trivially possible

Exception to that rule:  rare, based on system-wide concerns.
Like there being only one PMIC, one OTG port, and so on.  In
this case, not applicable.


I'd suggest allocating some memory in the per-lp5521 struct
to hold the strings, and catenating them with a label provided
in the platform data.   That way you won't be assuming there's
only a single lp5521, and the names for the LEDs can be more
relevant to the board ... "n810::red" and so forth.

- 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