diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-20 22:07:44 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-20 22:07:44 +0000 |
commit | 914624bd0e787219ab55bf33d1ac7c7412a8459c (patch) | |
tree | 7aafb4a1e663056450c53d9a1aed531f0f4c7e78 /linux/drivers | |
parent | 91ebcf14b8f1d729a2b5c28f23aa2165ccaf2ee1 (diff) | |
download | mediapointer-dvb-s2-914624bd0e787219ab55bf33d1ac7c7412a8459c.tar.gz mediapointer-dvb-s2-914624bd0e787219ab55bf33d1ac7c7412a8459c.tar.bz2 |
patch: s2255drv: fix race condition on set mode
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/s2255drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/s2255drv.c b/linux/drivers/media/video/s2255drv.c index c13aa2cc8..0fac6af08 100644 --- a/linux/drivers/media/video/s2255drv.c +++ b/linux/drivers/media/video/s2255drv.c @@ -1238,6 +1238,7 @@ static int s2255_set_mode(struct s2255_dev *dev, unsigned long chn, 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_dev *dev, unsigned long chn, /* 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)); |