summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2005-07-16 16:13:28 +0000
committerJohannes Stezenbach <devnull@localhost>2005-07-16 16:13:28 +0000
commit64c0538be64e95fafbb6a9c8eb8be0ee79a8ed71 (patch)
tree1883e92ab822de216bfc539efa3deede89b92ca5 /linux/drivers/media
parenta0ba7ba1dd99d05426eb932f1f3fa27c0f3a33f8 (diff)
downloadmediapointer-dvb-s2-64c0538be64e95fafbb6a9c8eb8be0ee79a8ed71.tar.gz
mediapointer-dvb-s2-64c0538be64e95fafbb6a9c8eb8be0ee79a8ed71.tar.bz2
Remove all #include <linux/version.h> and all references
to LINUX_VERSION_CODE and KERNEL_VERSION. Based on patch by Olaf Hering. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/common/saa7146_fops.c11
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c5
-rw-r--r--linux/drivers/media/common/saa7146_vbi.c34
-rw-r--r--linux/drivers/media/common/saa7146_video.c56
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c8
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_net.c5
-rw-r--r--linux/drivers/media/dvb/frontends/dib3000mb.c1
-rw-r--r--linux/drivers/media/dvb/frontends/dib3000mc.c1
-rw-r--r--linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c1
9 files changed, 4 insertions, 118 deletions
diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c
index 6be8e54d2..f0b291de8 100644
--- a/linux/drivers/media/common/saa7146_fops.c
+++ b/linux/drivers/media/common/saa7146_fops.c
@@ -1,5 +1,4 @@
#include <media/saa7146_vv.h>
-#include <linux/version.h>
#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
@@ -74,10 +73,8 @@ int saa7146_buffer_queue(struct saa7146_dev *dev,
struct saa7146_buf *buf)
{
#ifdef DEBUG_SPINLOCKS
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
BUG_ON(!spin_is_locked(&dev->slock));
#endif
-#endif
DEB_EE(("dev:%p, dmaq:%p, buf:%p\n", dev, q, buf));
BUG_ON(!q);
@@ -99,10 +96,8 @@ void saa7146_buffer_finish(struct saa7146_dev *dev,
int state)
{
#ifdef DEBUG_SPINLOCKS
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
BUG_ON(!spin_is_locked(&dev->slock));
#endif
-#endif
DEB_EE(("dev:%p, dmaq:%p, state:%d\n", dev, q, state));
DEB_EE(("q->curr:%p\n",q->curr));
@@ -131,10 +126,8 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
DEB_INT(("dev:%p, dmaq:%p, vbi:%d\n", dev, q, vbi));
#ifdef DEBUG_SPINLOCKS
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
BUG_ON(!spin_is_locked(&dev->slock));
#endif
-#endif
if (!list_empty(&q->queue)) {
/* activate next one from queue */
buf = list_entry(q->queue.next,struct saa7146_buf,vb.queue);
@@ -346,11 +339,7 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma)
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
- return videobuf_mmap_mapper(vma,q);
-#else
return videobuf_mmap_mapper(q,vma);
-#endif
}
static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait)
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index 781f23f0c..8c764ee63 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -1,4 +1,3 @@
-#include <linux/version.h>
#include <media/saa7146_vv.h>
static u32 saa7146_i2c_func(struct i2c_adapter *adapter)
@@ -404,12 +403,8 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c
saa7146_i2c_reset(dev);
if( NULL != i2c_adapter ) {
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- i2c_adapter->data = dev;
-#else
BUG_ON(!i2c_adapter->class);
i2c_set_adapdata(i2c_adapter,dev);
-#endif
i2c_adapter->algo = &saa7146_algo;
i2c_adapter->algo_data = NULL;
i2c_adapter->id = I2C_ALGO_SAA7146;
diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c
index d75d12157..8f65e154f 100644
--- a/linux/drivers/media/common/saa7146_vbi.c
+++ b/linux/drivers/media/common/saa7146_vbi.c
@@ -214,14 +214,9 @@ static int buffer_activate(struct saa7146_dev *dev,
return 0;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field field)
-{
-#else
static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,enum v4l2_field field)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;
@@ -271,11 +266,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e
return err;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
-static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
-#else
static int buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size)
-#endif
{
int llength,lines;
@@ -290,14 +281,9 @@ static int buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned
return 0;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
-static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
-{
-#else
static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -307,14 +293,9 @@ static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
saa7146_buffer_queue(dev,&vv->vbi_q,buf);
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
-static void buffer_release(struct file *file, struct videobuf_buffer *vb)
-{
-#else
static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;
@@ -354,11 +335,7 @@ static void vbi_stop(struct saa7146_fh *fh, struct file *file)
saa7146_buffer_finish(dev,&vv->vbi_q,STATE_DONE);
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- videobuf_queue_cancel(file,&fh->vbi_q);
-#else
videobuf_queue_cancel(&fh->vbi_q);
-#endif
vv->vbi_streaming = NULL;
@@ -431,11 +408,8 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file)
dev->pci, &dev->slock,
V4L2_BUF_TYPE_VBI_CAPTURE,
V4L2_FIELD_SEQ_TB, // FIXME: does this really work?
- sizeof(struct saa7146_buf)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
- ,file
-#endif
- );
+ sizeof(struct saa7146_buf),
+ file);
init_MUTEX(&fh->vbi_q.lock);
init_timer(&fh->vbi_read_timeout);
@@ -511,12 +485,8 @@ static ssize_t vbi_read(struct file *file, char __user *data, size_t count, loff
}
mod_timer(&fh->vbi_read_timeout, jiffies+BUFFER_TIMEOUT);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- ret = videobuf_read_stream(file, &fh->vbi_q, data, count, ppos, 1);
-#else
ret = videobuf_read_stream(&fh->vbi_q, data, count, ppos, 1,
file->f_flags & O_NONBLOCK);
-#endif
/*
printk("BASE_ODD3: 0x%08x\n", saa7146_read(dev, BASE_ODD3));
printk("BASE_EVEN3: 0x%08x\n", saa7146_read(dev, BASE_EVEN3));
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index 1bb0c159c..98c97ba8f 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -1137,11 +1137,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
case VIDIOC_REQBUFS: {
struct v4l2_requestbuffers *req = arg;
DEB_D(("VIDIOC_REQBUFS, type:%d\n",req->type));
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- return videobuf_reqbufs(file,q,req);
-#else
return videobuf_reqbufs(q,req);
-#endif
}
case VIDIOC_QUERYBUF: {
struct v4l2_buffer *buf = arg;
@@ -1151,22 +1147,14 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
case VIDIOC_QBUF: {
struct v4l2_buffer *buf = arg;
int ret = 0;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- ret = videobuf_qbuf(file,q,buf);
-#else
ret = videobuf_qbuf(q,buf);
-#endif
DEB_D(("VIDIOC_QBUF: ret:%d, index:%d\n",ret,buf->index));
return ret;
}
case VIDIOC_DQBUF: {
struct v4l2_buffer *buf = arg;
int ret = 0;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- ret = videobuf_dqbuf(file,q,buf);
-#else
ret = videobuf_dqbuf(q,buf,file->f_flags & O_NONBLOCK);
-#endif
DEB_D(("VIDIOC_DQBUF: ret:%d, index:%d\n",ret,buf->index));
return ret;
}
@@ -1178,11 +1166,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
if( 0 != err) {
return err;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- err = videobuf_streamon(file,q);
-#else
err = videobuf_streamon(q);
-#endif
return err;
}
case VIDIOC_STREAMOFF: {
@@ -1203,11 +1187,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
return -EBUSY;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- err = videobuf_streamoff(file,q);
-#else
err = videobuf_streamoff(q);
-#endif
if (0 != err) {
DEB_D(("warning: videobuf_streamoff() failed.\n"));
video_end(fh, file);
@@ -1230,13 +1210,8 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
q = &fh->video_q;
down(&q->lock);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- err = videobuf_mmap_setup(file,q,gbuffers,gbufsize,
- V4L2_MEMORY_MMAP);
-#else
err = videobuf_mmap_setup(q,gbuffers,gbufsize,
V4L2_MEMORY_MMAP);
-#endif
if (err < 0) {
up(&q->lock);
return err;
@@ -1272,14 +1247,9 @@ static int buffer_activate (struct saa7146_dev *dev,
return 0;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
-static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field field)
-{
-#else
static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,enum v4l2_field field)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -1360,14 +1330,9 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e
return err;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
-static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
-{
-#else
static int buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
if (0 == *count || *count > MAX_SAA7146_CAPTURE_BUFFERS)
@@ -1385,14 +1350,9 @@ static int buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned
return 0;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
-static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
-{
-#else
static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -1402,14 +1362,9 @@ static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
saa7146_buffer_queue(fh->dev,&vv->video_q,buf);
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
-static void buffer_release(struct file *file, struct videobuf_buffer *vb)
-{
-#else
static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
struct file *file = q->priv_data;
-#endif
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;
@@ -1463,11 +1418,8 @@ static int video_open(struct saa7146_dev *dev, struct file *file)
dev->pci, &dev->slock,
V4L2_BUF_TYPE_VIDEO_CAPTURE,
V4L2_FIELD_INTERLACED,
- sizeof(struct saa7146_buf)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10))
- ,file
-#endif
- );
+ sizeof(struct saa7146_buf),
+ file);
init_MUTEX(&fh->video_q.lock);
@@ -1533,12 +1485,8 @@ static ssize_t video_read(struct file *file, char __user *data, size_t count, lo
goto out;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
- ret = videobuf_read_one(file, &fh->video_q , data, count, ppos);
-#else
ret = videobuf_read_one(&fh->video_q , data, count, ppos,
file->f_flags & O_NONBLOCK);
-#endif
if (ret != 0) {
video_end(fh, file);
} else {
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index bb63dc5db..150032f5f 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -25,7 +25,6 @@
#include <linux/config.h>
#include <linux/init.h>
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/pci.h>
@@ -36,13 +35,6 @@
#include "dvb_demux.h"
#include "dvb_net.h"
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-static inline int remap_pfn_range(struct vm_area_struct *vma, unsigned long uvaddr,
- unsigned long paddr, unsigned long size, pgprot_t prot)
-{
- return remap_page_range(vma, uvaddr, paddr << PAGE_SHIFT, size, prot);
-}
-#endif
#ifdef CONFIG_DVB_CINERGYT2_TUNING
#define STREAM_URB_COUNT (CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT)
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c
index 6a968c346..33a357c48 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c
@@ -62,7 +62,6 @@
#include <linux/uio.h>
#include <asm/uaccess.h>
#include <linux/crc32.h>
-#include <linux/version.h>
#include "dvb_demux.h"
#include "dvb_net.h"
@@ -171,11 +170,7 @@ static unsigned short dvb_net_eth_type_trans(struct sk_buff *skb,
skb->mac.raw=skb->data;
skb_pull(skb,dev->hard_header_len);
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,8)
- eth = skb->mac.ethernet;
-#else
eth = eth_hdr(skb);
-#endif
if (*eth->h_dest & 1) {
if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0)
diff --git a/linux/drivers/media/dvb/frontends/dib3000mb.c b/linux/drivers/media/dvb/frontends/dib3000mb.c
index cd434b7cf..21433e183 100644
--- a/linux/drivers/media/dvb/frontends/dib3000mb.c
+++ b/linux/drivers/media/dvb/frontends/dib3000mb.c
@@ -23,7 +23,6 @@
#include <linux/config.h>
#include <linux/kernel.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
diff --git a/linux/drivers/media/dvb/frontends/dib3000mc.c b/linux/drivers/media/dvb/frontends/dib3000mc.c
index cd33705a4..441de665f 100644
--- a/linux/drivers/media/dvb/frontends/dib3000mc.c
+++ b/linux/drivers/media/dvb/frontends/dib3000mc.c
@@ -22,7 +22,6 @@
*/
#include <linux/config.h>
#include <linux/kernel.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index 45c9a9a08..3d08fc83a 100644
--- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -28,7 +28,6 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/usb.h>
-#include <linux/version.h>
#include <linux/interrupt.h>
#include <linux/firmware.h>
#include <linux/crc32.h>