summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2016-04-25 14:02:36 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-04-25 14:06:38 -0700
commit28a994fad95dd8475f04bd036e08a14aa8d125ea (patch)
tree710e9c08f5af4adac5ed19c27cab66285bf98b95 /drivers/input/touchscreen
parentdcc7597116c6713353522eb13c765063ff88bb89 (diff)
Input: twl6040-vibra - fix atomic schedule panic
commit c6f39257c952 ("mfd: twl6040: Use regmap for register cache") did remove the private cache for the vibra control registers and replaced access within twl6040_get_vibralr_status() by calls to regmap. This is OK, as long as twl6040_get_vibralr_status() uses already cached values or is not called from interrupt context. But we call this in vibra_play() for checking that the vibrator is not configured for audio mode. The result is a "BUG: scheduling while atomic" if the first use of the twl6040 is a vibra effect, because the first fetch is by reading the twl6040 registers through (blocking) i2c and not from the cache. As soon as the regmap has cached the status, further calls are fine. The solution is to move the condition to the work() function which runs in context that can block. The original code returns -EBUSY, but the return value of ->play() functions is ignored anyways. Hence, we do not loose functionality by not returning an error but just reporting the issue to INFO loglevel. Tested-on: Pyra (omap5) prototype Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
0 files changed, 0 insertions, 0 deletions