Re: [PATCH RFC 2/4] backlight: use spin-lock to protect device list

2014-09-11 Thread Jani Nikula
On Wed, 10 Sep 2014, David Herrmann wrote: > There is really no reason to use a mutex to protect a simple list. Convert > the list-lock to a simple spinlock instead. > > The spin-locks prepare for a backlight_find() helper, which should > preferably be usable from atomic context. A mutex would

Re: [PATCH RFC 2/4] backlight: use spin-lock to protect device list

2014-09-11 Thread Jani Nikula
On Wed, 10 Sep 2014, David Herrmann dh.herrm...@gmail.com wrote: There is really no reason to use a mutex to protect a simple list. Convert the list-lock to a simple spinlock instead. The spin-locks prepare for a backlight_find() helper, which should preferably be usable from atomic context.

[PATCH RFC 2/4] backlight: use spin-lock to protect device list

2014-09-10 Thread David Herrmann
There is really no reason to use a mutex to protect a simple list. Convert the list-lock to a simple spinlock instead. The spin-locks prepare for a backlight_find() helper, which should preferably be usable from atomic context. A mutex would prevent that, so use an irq-save spinlock instead.

[PATCH RFC 2/4] backlight: use spin-lock to protect device list

2014-09-10 Thread David Herrmann
There is really no reason to use a mutex to protect a simple list. Convert the list-lock to a simple spinlock instead. The spin-locks prepare for a backlight_find() helper, which should preferably be usable from atomic context. A mutex would prevent that, so use an irq-save spinlock instead.