diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-12 10:57:08 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-14 11:34:23 -0500 |
commit | 229295f1d6713bc8c8ba900ba62bca03e34bba52 (patch) | |
tree | 6103e6cc81c1d015f946a6fbda6844435597ace2 | |
parent | e847022a8e1d732da96ddbd8d4170500f4c3f8b1 (diff) |
[media] em28xx-audio: fix return code on device disconnect
Alsa has an special non-negative return code to indicate device removal
at snd_em28xx_capture_pointer(). Use it, instead of an error code.
Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-audio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c index f3e320098f79..47766b796acb 100644 --- a/drivers/media/usb/em28xx/em28xx-audio.c +++ b/drivers/media/usb/em28xx/em28xx-audio.c | |||
@@ -434,7 +434,7 @@ static snd_pcm_uframes_t snd_em28xx_capture_pointer(struct snd_pcm_substream | |||
434 | 434 | ||
435 | dev = snd_pcm_substream_chip(substream); | 435 | dev = snd_pcm_substream_chip(substream); |
436 | if (dev->disconnected) | 436 | if (dev->disconnected) |
437 | return -ENODEV; | 437 | return SNDRV_PCM_POS_XRUN; |
438 | 438 | ||
439 | spin_lock_irqsave(&dev->adev.slock, flags); | 439 | spin_lock_irqsave(&dev->adev.slock, flags); |
440 | hwptr_done = dev->adev.hwptr_done_capture; | 440 | hwptr_done = dev->adev.hwptr_done_capture; |