Commit 34612157 authored by Oliver Endriss's avatar Oliver Endriss Committed by Linus Torvalds

[PATCH] dvb: ttpci: make av7110_fe_lock_fix() retryable

av7110_fe_lock_fix() modified in a way that it can be retried after
-ERESTARTSYS
Signed-off-by: default avatarOliver Endriss <o.endriss@gmx.de>
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7a2fa90f
...@@ -2038,15 +2038,13 @@ static int av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status) ...@@ -2038,15 +2038,13 @@ static int av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status)
if (av7110->fe_synced == synced) if (av7110->fe_synced == synced)
return 0; return 0;
av7110->fe_synced = synced;
if (av7110->playing) if (av7110->playing)
return 0; return 0;
if (down_interruptible(&av7110->pid_mutex)) if (down_interruptible(&av7110->pid_mutex))
return -ERESTARTSYS; return -ERESTARTSYS;
if (av7110->fe_synced) { if (synced) {
ret = SetPIDs(av7110, av7110->pids[DMX_PES_VIDEO], ret = SetPIDs(av7110, av7110->pids[DMX_PES_VIDEO],
av7110->pids[DMX_PES_AUDIO], av7110->pids[DMX_PES_AUDIO],
av7110->pids[DMX_PES_TELETEXT], 0, av7110->pids[DMX_PES_TELETEXT], 0,
...@@ -2062,6 +2060,9 @@ static int av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status) ...@@ -2062,6 +2060,9 @@ static int av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status)
} }
} }
if (!ret)
av7110->fe_synced = synced;
up(&av7110->pid_mutex); up(&av7110->pid_mutex);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment