Re: [PATCH 4/8] i2c: lp5521: move to LED framework

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

 




On Thu, 12 Feb 2009 14:18:17 -0800, David Brownell <david-b@xxxxxxxxxxx>
wrote:
> 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.

makes sense to me, I'll update this patch and resend :-)

-- 
Best Regards,

Felipe Balbi
http://blog.felipebalbi.com
me@xxxxxxxxxxxxxxx

--
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