Input: pwm-beeper - fix - scheduling while atomic
authorManfred Schlaegl <manfred.schlaegl@gmx.at>
Fri, 27 May 2016 23:36:36 +0000 (16:36 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 27 May 2016 23:40:30 +0000 (16:40 -0700)
commitf49cf3b8b4c841457244c461c66186a719e13bcc
tree11485c8b7383180ea9a68990dd58e79c5ffd88ab
parent6f49a398b266d4895bd7e041db77a2b2ee1482a6
Input: pwm-beeper - fix - scheduling while atomic

Pwm config may sleep so defer it using a worker.

On a Freescale i.MX53 based board we ran into "BUG: scheduling while
atomic" because input_inject_event locks interrupts, but
imx_pwm_config_v2 sleeps.

Tested on Freescale i.MX53 SoC with 4.6.0.

Signed-off-by: Manfred Schlaegl <manfred.schlaegl@gmx.at>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/pwm-beeper.c