* patch: s2255drv: fix race condition on set mode
@ 2009-04-20 22:07 Dean A.
0 siblings, 0 replies; only message in thread
From: Dean A. @ 2009-04-20 22:07 UTC (permalink / raw)
To: linux-media, mchehab, video4linux-list
From: Dean Anderson <dean@sensoray.com>
set_modeready flag must be set before command sent to USB in
s2255_write_config.
Signed-off-by: Dean Anderson <dean@sensoray.com>
--- v4l-dvb-74b7f650670a/linux/drivers/media/video/s2255drv.c.orig 2009-04-20 14:33:04.000000000 -0700
+++ v4l-dvb-74b7f650670a/linux/drivers/media/video/s2255drv.c 2009-04-20 14:58:22.000000000 -0700
@@ -1238,6 +1238,7 @@ static int s2255_set_mode(struct s2255_d
buffer[1] = (u32) chn_rev;
buffer[2] = CMD_SET_MODE;
memcpy(&buffer[3], &dev->mode[chn], sizeof(struct s2255_mode));
+ dev->setmode_ready[chn] = 0;
res = s2255_write_config(dev->udev, (unsigned char *)buffer, 512);
if (debug)
dump_verify_mode(dev, mode);
@@ -1246,7 +1247,6 @@ static int s2255_set_mode(struct s2255_d
/* wait at least 3 frames before continuing */
if (mode->restart) {
- dev->setmode_ready[chn] = 0;
wait_event_timeout(dev->wait_setmode[chn],
(dev->setmode_ready[chn] != 0),
msecs_to_jiffies(S2255_SETMODE_TIMEOUT));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-20 22:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-20 22:07 patch: s2255drv: fix race condition on set mode Dean A.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.