diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-04 19:07:50 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-04 19:07:50 -0400 |
| 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) | |||
| 181 | { | 181 | { |
| 182 | struct vibra_info *info = container_of(work, | 182 | struct vibra_info *info = container_of(work, |
| 183 | struct vibra_info, play_work); | 183 | struct vibra_info, play_work); |
| 184 | int ret; | ||
| 185 | |||
| 186 | /* Do not allow effect, while the routing is set to use audio */ | ||
| 187 | ret = twl6040_get_vibralr_status(info->twl6040); | ||
| 188 | if (ret & TWL6040_VIBSEL) { | ||
| 189 | dev_info(info->dev, "Vibra is configured for audio\n"); | ||
| 190 | return; | ||
| 191 | } | ||
| 184 | 192 | ||
| 185 | mutex_lock(&info->mutex); | 193 | mutex_lock(&info->mutex); |
| 186 | 194 | ||
| @@ -199,14 +207,6 @@ static int vibra_play(struct input_dev *input, void *data, | |||
| 199 | struct ff_effect *effect) | 207 | struct ff_effect *effect) |
| 200 | { | 208 | { |
| 201 | struct vibra_info *info = input_get_drvdata(input); | 209 | struct vibra_info *info = input_get_drvdata(input); |
| 202 | int ret; | ||
| 203 | |||
| 204 | /* Do not allow effect, while the routing is set to use audio */ | ||
| 205 | ret = twl6040_get_vibralr_status(info->twl6040); | ||
| 206 | if (ret & TWL6040_VIBSEL) { | ||
| 207 | dev_info(&input->dev, "Vibra is configured for audio\n"); | ||
| 208 | return -EBUSY; | ||
| 209 | } | ||
| 210 | 210 | ||
| 211 | info->weak_speed = effect->u.rumble.weak_magnitude; | 211 | info->weak_speed = effect->u.rumble.weak_magnitude; |
| 212 | info->strong_speed = effect->u.rumble.strong_magnitude; | 212 | info->strong_speed = effect->u.rumble.strong_magnitude; |
