diff options
author | Linus Torvalds | 2016-05-04 16:07:50 -0700 |
---|---|---|
committer | Linus Torvalds | 2016-05-04 16:07:50 -0700 |
commit | 21a9703de3045cda0b3aaa5bc193d2e1062908d2 (patch) | |
tree | 0a3e22d42fb8002f0a21f4cf911aba717b04a002 /drivers/input/misc | |
parent | 4810d9682971e8eee659f96e4f9d9154e3c6c0b4 (diff) | |
parent | eb43335c409543506dd84b59f5c6bdd35cecf2c7 (diff) |
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; |