[PATCH v2 1/2] leds: Add support for Palmas LEDs

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Mar 13 06:10:29 EST 2013


On Tue, Mar 12, 2013 at 11:57:50AM -0700, Bryan Wu wrote:
> On Thu, Feb 28, 2013 at 7:21 AM, Ian Lartey <ian at slimlogic.co.uk> wrote:

> > +       spinlock_t value_lock;

> I think you don't need this spinlock to protect the value, the mutex is enough.

You need to use a spinlock because values can be set from hard IRQ
context so you can't take a mutex there.  Someone should really factor
this out into the framework in their copious free time, the set and
schedule pattern is very common in drivers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20130312/5ca8a85f/attachment.sig>


More information about the devicetree-discuss mailing list