diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-10 23:08:26 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:02:06 -0500 |
commit | a225452ef80a7bd894fd2dfd01a4973d444152f4 (patch) | |
tree | 397c483c75751106545ef989d83fe25a7c57347b /drivers/media/video/em28xx/em28xx.h | |
parent | a3a048cea301baba5d451991074a85dc20a8f228 (diff) |
V4L/DVB (6583): Fix em28xx read stream locking
On some situations, closing an streaming application and re-opening were
returning -EBUSY.
Uses the same locking schema also present on cx88.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index f8ad0f4ae6d2..3efc05d2df67 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -224,6 +224,8 @@ struct em28xx { | |||
224 | unsigned int has_msp34xx:1; | 224 | unsigned int has_msp34xx:1; |
225 | unsigned int has_tda9887:1; | 225 | unsigned int has_tda9887:1; |
226 | 226 | ||
227 | unsigned int stream_on:1; /* Locks streams */ | ||
228 | |||
227 | u32 i2s_speed; /* I2S speed for audio digital stream */ | 229 | u32 i2s_speed; /* I2S speed for audio digital stream */ |
228 | 230 | ||
229 | enum em28xx_decoder decoder; | 231 | enum em28xx_decoder decoder; |
@@ -258,7 +260,6 @@ struct em28xx { | |||
258 | int vscale; /* vertical scale factor (see datasheet) */ | 260 | int vscale; /* vertical scale factor (see datasheet) */ |
259 | int interlaced; /* 1=interlace fileds, 0=just top fileds */ | 261 | int interlaced; /* 1=interlace fileds, 0=just top fileds */ |
260 | int type; | 262 | int type; |
261 | unsigned int reader:1; | ||
262 | 263 | ||
263 | unsigned long hash; /* eeprom hash - for boards with generic ID */ | 264 | unsigned long hash; /* eeprom hash - for boards with generic ID */ |
264 | unsigned long i2c_hash; /* i2c devicelist hash - for boards with generic ID */ | 265 | unsigned long i2c_hash; /* i2c devicelist hash - for boards with generic ID */ |
@@ -297,7 +298,7 @@ struct em28xx { | |||
297 | 298 | ||
298 | struct em28xx_fh { | 299 | struct em28xx_fh { |
299 | struct em28xx *dev; | 300 | struct em28xx *dev; |
300 | unsigned int reader:1; | 301 | unsigned int stream_on:1; /* Locks streams */ |
301 | }; | 302 | }; |
302 | 303 | ||
303 | /* Provided by em28xx-i2c.c */ | 304 | /* Provided by em28xx-i2c.c */ |