diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-05 01:07:50 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-05 01:07:50 +0200 |
commit | 21a9703de3045cda0b3aaa5bc193d2e1062908d2 (patch) | |
tree | 0a3e22d42fb8002f0a21f4cf911aba717b04a002 /drivers/input/misc | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmo... (diff) | |
parent | Input: atmel_mxt_ts - use mxt_acquire_irq in mxt_soft_reset (diff) | |
download | linux-21a9703de3045cda0b3aaa5bc193d2e1062908d2.tar.xz linux-21a9703de3045cda0b3aaa5bc193d2e1062908d2.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input fixes from Dmitry Torokhov.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: atmel_mxt_ts - use mxt_acquire_irq in mxt_soft_reset
Input: zforce_ts - fix dual touch recognition
Input: twl6040-vibra - fix atomic schedule panic
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/twl6040-vibra.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c index 53e33fab3f7a..df3581f60628 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c @@ -181,6 +181,14 @@ static void vibra_play_work(struct work_struct *work) { struct vibra_info *info = container_of(work, struct vibra_info, play_work); + int ret; + + /* Do not allow effect, while the routing is set to use audio */ + ret = twl6040_get_vibralr_status(info->twl6040); + if (ret & TWL6040_VIBSEL) { + dev_info(info->dev, "Vibra is configured for audio\n"); + return; + } mutex_lock(&info->mutex); @@ -199,14 +207,6 @@ static int vibra_play(struct input_dev *input, void *data, struct ff_effect *effect) { struct vibra_info *info = input_get_drvdata(input); - int ret; - - /* Do not allow effect, while the routing is set to use audio */ - ret = twl6040_get_vibralr_status(info->twl6040); - if (ret & TWL6040_VIBSEL) { - dev_info(&input->dev, "Vibra is configured for audio\n"); - return -EBUSY; - } info->weak_speed = effect->u.rumble.weak_magnitude; info->strong_speed = effect->u.rumble.strong_magnitude; |