From a225452ef80a7bd894fd2dfd01a4973d444152f4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 11 Nov 2007 01:08:26 -0300 Subject: 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 --- drivers/media/video/em28xx/em28xx.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/media/video/em28xx/em28xx.h') 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 { unsigned int has_msp34xx:1; unsigned int has_tda9887:1; + unsigned int stream_on:1; /* Locks streams */ + u32 i2s_speed; /* I2S speed for audio digital stream */ enum em28xx_decoder decoder; @@ -258,7 +260,6 @@ struct em28xx { int vscale; /* vertical scale factor (see datasheet) */ int interlaced; /* 1=interlace fileds, 0=just top fileds */ int type; - unsigned int reader:1; unsigned long hash; /* eeprom hash - for boards with generic ID */ unsigned long i2c_hash; /* i2c devicelist hash - for boards with generic ID */ @@ -297,7 +298,7 @@ struct em28xx { struct em28xx_fh { struct em28xx *dev; - unsigned int reader:1; + unsigned int stream_on:1; /* Locks streams */ }; /* Provided by em28xx-i2c.c */ -- cgit v1.2.3