From be80b76533c8db5af8ef3464c84d56c45767ed60 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 6 Feb 2006 13:59:37 -0200 Subject: sem2mutex: drivers/media/, #2 Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Kernel-sync from patch 3318b Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- linux/include/linux/videodev2.h | 7 +++++++ linux/include/media/saa7146.h | 33 +++++++++++++++++++++++++-------- linux/include/media/video-buf-dvb.h | 4 ++++ linux/include/media/video-buf.h | 4 ++++ 4 files changed, 40 insertions(+), 8 deletions(-) (limited to 'linux/include') diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index f7db94457..0fe3901c6 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -21,6 +21,9 @@ #endif #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) #include +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) +#include +#endif #endif #endif #include /* need __user */ @@ -108,7 +111,11 @@ struct video_device /* for videodev.c intenal usage -- please don't touch */ int users; /* video_exclusive_{open|close} ... */ +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) + struct mutex lock; /* ... helper function uses these */ +#else struct semaphore lock; /* ... helper function uses these */ +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69) devfs_handle_t devfs_handle; /* devfs */ #else diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h index 760ae6324..be8b003c0 100644 --- a/linux/include/media/saa7146.h +++ b/linux/include/media/saa7146.h @@ -11,9 +11,13 @@ #include /* for i2c subsystem */ #include /* for accessing devices */ #include +#include "compat.h" +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) +#include +#endif + #include /* for vmalloc() */ #include /* for vmalloc_to_page() */ -#include "compat.h" #define SAA7146_VERSION_CODE 0x000500 /* 0.5.0 */ @@ -122,7 +126,11 @@ struct saa7146_dev /* different device locks */ spinlock_t slock; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) + struct mutex lock; +#else struct semaphore lock; +#endif unsigned char __iomem *mem; /* pointer to mapped IO memory */ int revision; /* chip revision; needed for bug-workarounds*/ @@ -143,15 +151,20 @@ struct saa7146_dev void (*vv_callback)(struct saa7146_dev *dev, unsigned long status); /* i2c-stuff */ - struct semaphore i2c_lock; - u32 i2c_bitrate; - struct saa7146_dma d_i2c; /* pointer to i2c memory */ - wait_queue_head_t i2c_wq; - int i2c_op; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) + struct mutex i2c_lock; +#else + struct semaphore i2c_lock; +#endif + + u32 i2c_bitrate; + struct saa7146_dma d_i2c; /* pointer to i2c memory */ + wait_queue_head_t i2c_wq; + int i2c_op; /* memories */ - struct saa7146_dma d_rps0; - struct saa7146_dma d_rps1; + struct saa7146_dma d_rps0; + struct saa7146_dma d_rps1; }; /* from saa7146_i2c.c */ @@ -160,7 +173,11 @@ int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg *msgs, in /* from saa7146_core.c */ extern struct list_head saa7146_devices; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) +extern struct mutex saa7146_devices_lock; +#else extern struct semaphore saa7146_devices_lock; +#endif int saa7146_register_extension(struct saa7146_extension*); int saa7146_unregister_extension(struct saa7146_extension*); struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); diff --git a/linux/include/media/video-buf-dvb.h b/linux/include/media/video-buf-dvb.h index 94d16e0ed..49cb08d75 100644 --- a/linux/include/media/video-buf-dvb.h +++ b/linux/include/media/video-buf-dvb.h @@ -12,7 +12,11 @@ struct videobuf_dvb { struct videobuf_queue dvbq; /* video-buf-dvb state info */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) + struct mutex lock; +#else struct semaphore lock; +#endif struct task_struct *thread; int nfeeds; diff --git a/linux/include/media/video-buf.h b/linux/include/media/video-buf.h index 6c1dc2777..dd2bb1800 100644 --- a/linux/include/media/video-buf.h +++ b/linux/include/media/video-buf.h @@ -178,7 +178,11 @@ struct videobuf_queue_ops { }; struct videobuf_queue { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) + struct mutex lock; +#else struct semaphore lock; +#endif spinlock_t *irqlock; struct pci_dev *pci; -- cgit v1.2.3 From f1e940da2ce33a9b48e62632c7f838b298097609 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Mon, 6 Feb 2006 14:00:54 -0500 Subject: sem2mutex: fix local build and backwards-compatability From: Michael Krufky Patch 3320 breaks our repository. This should fix it. Signed-off-by: Michael Krufky --- linux/include/media/video-buf-dvb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/include') diff --git a/linux/include/media/video-buf-dvb.h b/linux/include/media/video-buf-dvb.h index 49cb08d75..8dcaad6a1 100644 --- a/linux/include/media/video-buf-dvb.h +++ b/linux/include/media/video-buf-dvb.h @@ -12,7 +12,7 @@ struct videobuf_dvb { struct videobuf_queue dvbq; /* video-buf-dvb state info */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) struct mutex lock; #else struct semaphore lock; -- cgit v1.2.3 From afcfb73bdbe21ae90b41a3adc127b65854b294df Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 7 Feb 2006 10:15:34 -0200 Subject: Kernel Sync stuff From: Mauro Carvalho Chehab Added a new format at videodev2.h Added support for a new board at snd-bt87x module kernel-sync Signed-off-by: Mauro Carvalho Chehab --- linux/include/linux/videodev2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/include') diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 0fe3901c6..1b76d3e9a 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -356,6 +356,7 @@ struct v4l2_pix_format #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ +#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ /* * F O R M A T E N U M E R A T I O N -- cgit v1.2.3