Re: [PATCH v3] rfkill: Add rfkill-any LED trigger

2017-01-05 Thread Michał Kępień
> On Mon, 2017-01-02 at 13:21 +0100, Johannes Berg wrote: > > > I'm not super happy with this conditional locking - can't we > > > instead > > > defer the necessary work to a workqueue, or so, for purposes of the > > > LED? > > > > Actually, since you can sleep in here, and do various other things

Re: [PATCH v3] rfkill: Add rfkill-any LED trigger

2017-01-02 Thread Johannes Berg
On Mon, 2017-01-02 at 13:21 +0100, Johannes Berg wrote: > > I'm not super happy with this conditional locking - can't we > > instead > > defer the necessary work to a workqueue, or so, for purposes of the > > LED? > > Actually, since you can sleep in here, and do various other things > like schedu

Re: [PATCH v3] rfkill: Add rfkill-any LED trigger

2017-01-02 Thread Johannes Berg
> I'm not super happy with this conditional locking - can't we instead > defer the necessary work to a workqueue, or so, for purposes of the > LED? Actually, since you can sleep in here, and do various other things like scheduling etc. this can't even be correct as is - one thread might be in the

[PATCH v3] rfkill: Add rfkill-any LED trigger

2017-01-02 Thread Mike Krinkin
On Wed, Dec 21, 2016 at 09:45:33AM +0100, Michał Kępień wrote: > Add a new "global" (i.e. not per-rfkill device) LED trigger, rfkill-any, > which may be useful on laptops with a single "radio LED" and multiple > radio transmitters. The trigger is meant to turn a LED on whenever > there is at least

Re: [PATCH v3] rfkill: Add rfkill-any LED trigger

2017-01-02 Thread Johannes Berg
>   - Handle the global mutex properly when rfkill_set_{hw,sw}_state() > or > rfkill_set_states() is called from within an rfkill callback.  v2 > always tried to lock the global mutex in such a case, which led > to a > deadlock when an rfkill driver called one of the above functions >

[PATCH v3] rfkill: Add rfkill-any LED trigger

2016-12-21 Thread Michał Kępień
Add a new "global" (i.e. not per-rfkill device) LED trigger, rfkill-any, which may be useful on laptops with a single "radio LED" and multiple radio transmitters. The trigger is meant to turn a LED on whenever there is at least one radio transmitter active and turn it off otherwise. This requires