summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/arv.c6
-rw-r--r--linux/drivers/media/video/au0828/au0828-core.c5
-rw-r--r--linux/drivers/media/video/au0828/au0828.h8
-rw-r--r--linux/drivers/media/video/bt8xx/bt832.c11
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-cards.c5
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-driver.c4
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-gpio.c7
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-i2c.c4
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-input.c4
-rw-r--r--linux/drivers/media/video/bt8xx/bttv.h2
-rw-r--r--linux/drivers/media/video/bt8xx/bttvp.h6
-rw-r--r--linux/drivers/media/video/bw-qcam.c2
-rw-r--r--linux/drivers/media/video/bw-qcam.h4
-rw-r--r--linux/drivers/media/video/c-qcam.c6
-rw-r--r--linux/drivers/media/video/cpia.c2
-rw-r--r--linux/drivers/media/video/cpia.h10
-rw-r--r--linux/drivers/media/video/cpia2/cpia2.h4
-rw-r--r--linux/drivers/media/video/cx18/cx18-driver.h16
-rw-r--r--linux/drivers/media/video/cx23885/Kconfig1
-rw-r--r--linux/drivers/media/video/cx23885/cx23885-dvb.c15
-rw-r--r--linux/drivers/media/video/cx23885/cx23885.h6
-rw-r--r--linux/drivers/media/video/cx88/cx88-core.c2
-rw-r--r--linux/drivers/media/video/cx88/cx88-i2c.c6
-rw-r--r--linux/drivers/media/video/cx88/cx88-input.c4
-rw-r--r--linux/drivers/media/video/cx88/cx88.h6
-rw-r--r--linux/drivers/media/video/dabusb.c2
-rw-r--r--linux/drivers/media/video/dabusb.h4
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-dvb.c4
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-i2c.c3
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-input.c4
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c5
-rw-r--r--linux/drivers/media/video/em28xx/em28xx.h6
-rw-r--r--linux/drivers/media/video/et61x251/et61x251.h6
-rw-r--r--linux/drivers/media/video/ir-kbd-i2c.c6
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-driver.h15
-rw-r--r--linux/drivers/media/video/meye.h6
-rw-r--r--linux/drivers/media/video/ov511.h5
-rw-r--r--linux/drivers/media/video/planb.c2
-rw-r--r--linux/drivers/media/video/planb.h4
-rw-r--r--linux/drivers/media/video/pms.c6
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-context.h8
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c4
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-dvb.h4
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h16
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c8
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-io.c8
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c8
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-main.c3
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c4
-rw-r--r--linux/drivers/media/video/pwc/pwc.h8
-rw-r--r--linux/drivers/media/video/saa5246a.c6
-rw-r--r--linux/drivers/media/video/saa5249.c6
-rw-r--r--linux/drivers/media/video/saa6588.c9
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c9
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-i2c.c8
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-input.c4
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h10
-rw-r--r--linux/drivers/media/video/se401.h6
-rw-r--r--linux/drivers/media/video/sn9c102/sn9c102.h6
-rw-r--r--linux/drivers/media/video/stv680.c2
-rw-r--r--linux/drivers/media/video/stv680.h4
-rw-r--r--linux/drivers/media/video/tda7432.c6
-rw-r--r--linux/drivers/media/video/tda9840.c12
-rw-r--r--linux/drivers/media/video/tda9875.c6
-rw-r--r--linux/drivers/media/video/tea6415c.c12
-rw-r--r--linux/drivers/media/video/tea6420.c12
-rw-r--r--linux/drivers/media/video/tuner-core.c10
-rw-r--r--linux/drivers/media/video/tvmixer.c6
-rw-r--r--linux/drivers/media/video/tvp5150.c25
-rw-r--r--linux/drivers/media/video/usbvideo/konicawc.c4
-rw-r--r--linux/drivers/media/video/usbvideo/quickcam_messenger.c4
-rw-r--r--linux/drivers/media/video/usbvideo/usbvideo.h10
-rw-r--r--linux/drivers/media/video/usbvideo/vicam.c6
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-i2c.c5
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-video.c12
-rw-r--r--linux/drivers/media/video/usbvision/usbvision.h6
-rw-r--r--linux/drivers/media/video/v4l2-common.c3
-rw-r--r--linux/drivers/media/video/videodev.c3
-rw-r--r--linux/drivers/media/video/vino.c10
-rw-r--r--linux/drivers/media/video/vivi.c4
-rw-r--r--linux/drivers/media/video/w9968cf.h5
-rw-r--r--linux/drivers/media/video/zc0301/zc0301.h6
-rw-r--r--linux/drivers/media/video/zoran.h4
-rw-r--r--linux/drivers/media/video/zoran_card.c2
-rw-r--r--linux/drivers/media/video/zoran_driver.c2
-rw-r--r--linux/drivers/media/video/zr364xx.c4
87 files changed, 20 insertions, 526 deletions
diff --git a/linux/drivers/media/video/arv.c b/linux/drivers/media/video/arv.c
index 88507ed9b..8d8d339b5 100644
--- a/linux/drivers/media/video/arv.c
+++ b/linux/drivers/media/video/arv.c
@@ -30,9 +30,7 @@
#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
#include <linux/mutex.h>
-#endif
#include <asm/uaccess.h>
#include <asm/m32r.h>
@@ -118,11 +116,7 @@ struct ar_device {
int width, height;
int frame_bytes, line_bytes;
wait_queue_head_t wait;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
};
static int video_nr = -1; /* video device number (first free) */
diff --git a/linux/drivers/media/video/au0828/au0828-core.c b/linux/drivers/media/video/au0828/au0828-core.c
index 5642058ae..123422f82 100644
--- a/linux/drivers/media/video/au0828/au0828-core.c
+++ b/linux/drivers/media/video/au0828/au0828-core.c
@@ -23,9 +23,7 @@
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
#include <linux/mutex.h>
-#endif
#include "au0828.h"
@@ -218,9 +216,6 @@ static struct usb_driver au0828_usb_driver = {
.probe = au0828_usb_probe,
.disconnect = au0828_usb_disconnect,
.id_table = au0828_usb_id_table,
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
- .owner = THIS_MODULE,
-#endif
};
static int __init au0828_init(void)
diff --git a/linux/drivers/media/video/au0828/au0828.h b/linux/drivers/media/video/au0828/au0828.h
index b00d8cda5..7beb57179 100644
--- a/linux/drivers/media/video/au0828/au0828.h
+++ b/linux/drivers/media/video/au0828/au0828.h
@@ -44,11 +44,7 @@ struct au0828_board {
};
struct au0828_dvb {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
struct dvb_adapter adapter;
struct dvb_frontend *frontend;
struct dvb_demux demux;
@@ -60,11 +56,7 @@ struct au0828_dvb {
};
struct au0828_dev {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
struct usb_device *usbdev;
int board;
u8 ctrlmsg[64];
diff --git a/linux/drivers/media/video/bt8xx/bt832.c b/linux/drivers/media/video/bt8xx/bt832.c
index e860f7725..b677916bf 100644
--- a/linux/drivers/media/video/bt8xx/bt832.c
+++ b/linux/drivers/media/video/bt8xx/bt832.c
@@ -250,17 +250,9 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .name = "bt832",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "bt832",
},
-#endif
.id = 0, /* FIXME */
.attach_adapter = bt832_probe,
.detach_client = bt832_detach,
@@ -269,9 +261,6 @@ static struct i2c_driver driver = {
static struct i2c_client client_template =
{
.name = "bt832",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .flags = I2C_CLIENT_ALLOW_USE,
-#endif
.driver = &driver,
};
diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c
index 4d283be22..df2dfd2ba 100644
--- a/linux/drivers/media/video/bt8xx/bttv-cards.c
+++ b/linux/drivers/media/video/bt8xx/bttv-cards.c
@@ -4868,13 +4868,8 @@ void __init bttv_check_chipset(void)
}
if (UNSET != latency)
printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82441, dev))) {
-#else
- while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_82441, dev))) {
-#endif
unsigned char b;
pci_read_config_byte(dev, 0x53, &b);
if (bttv_debug)
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c
index 36efd08f8..9877a7124 100644
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c
@@ -4545,11 +4545,7 @@ static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state)
struct bttv_buffer_set idle;
unsigned long flags;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
dprintk("bttv%d: suspend %d\n", btv->c.nr, state.event);
-#else
- dprintk("bttv%d: suspend %d\n", btv->c.nr, state);
-#endif
/* stop dma + irqs */
spin_lock_irqsave(&btv->s_lock,flags);
diff --git a/linux/drivers/media/video/bt8xx/bttv-gpio.c b/linux/drivers/media/video/bt8xx/bttv-gpio.c
index 9b161b8dd..dce6dae57 100644
--- a/linux/drivers/media/video/bt8xx/bttv-gpio.c
+++ b/linux/drivers/media/video/bt8xx/bttv-gpio.c
@@ -47,7 +47,6 @@ static int bttv_sub_bus_match(struct device *dev, struct device_driver *drv)
return 0;
}
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
static int bttv_sub_probe(struct device *dev)
{
struct bttv_sub_device *sdev = to_bttv_sub_dev(dev);
@@ -66,17 +65,11 @@ static int bttv_sub_remove(struct device *dev)
return 0;
}
-#endif
struct bus_type bttv_sub_bus_type = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .name = "bttv-sub",
- .match = &bttv_sub_bus_match,
-#else
.name = "bttv-sub",
.match = &bttv_sub_bus_match,
.probe = bttv_sub_probe,
.remove = bttv_sub_remove,
-#endif
};
static void release_sub_device(struct device *dev)
diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c
index 4f48dfb26..bcd2cd240 100644
--- a/linux/drivers/media/video/bt8xx/bttv-i2c.c
+++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c
@@ -277,11 +277,7 @@ static int attach_inform(struct i2c_client *client)
if (bttv_debug)
printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- btv->c.nr, client->driver->name, client->addr,
-#else
btv->c.nr, client->driver->driver.name, client->addr,
-#endif
client->name);
if (!client->driver->command)
return 0;
diff --git a/linux/drivers/media/video/bt8xx/bttv-input.c b/linux/drivers/media/video/bt8xx/bttv-input.c
index ada104826..09dc5ac77 100644
--- a/linux/drivers/media/video/bt8xx/bttv-input.c
+++ b/linux/drivers/media/video/bt8xx/bttv-input.c
@@ -326,11 +326,7 @@ int bttv_input_init(struct bttv *btv)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
input_dev->dev.parent = &btv->c.pci->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &btv->c.pci->dev;
-#else
- input_dev->dev = &btv->c.pci->dev;
-#endif
#endif
btv->remote = ir;
diff --git a/linux/drivers/media/video/bt8xx/bttv.h b/linux/drivers/media/video/bt8xx/bttv.h
index dab61e62e..3441c0226 100644
--- a/linux/drivers/media/video/bt8xx/bttv.h
+++ b/linux/drivers/media/video/bt8xx/bttv.h
@@ -312,10 +312,8 @@ struct bttv_sub_device {
struct bttv_sub_driver {
struct device_driver drv;
char wanted[BUS_ID_SIZE];
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
int (*probe)(struct bttv_sub_device *sub);
void (*remove)(struct bttv_sub_device *sub);
-#endif
};
#define to_bttv_sub_drv(x) container_of((x), struct bttv_sub_driver, drv)
diff --git a/linux/drivers/media/video/bt8xx/bttvp.h b/linux/drivers/media/video/bt8xx/bttvp.h
index c3d1703ac..63d1d4451 100644
--- a/linux/drivers/media/video/bt8xx/bttvp.h
+++ b/linux/drivers/media/video/bt8xx/bttvp.h
@@ -35,9 +35,7 @@
#include <linux/videodev.h>
#include <linux/pci.h>
#include <linux/input.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <linux/scatterlist.h>
#include <asm/io.h>
#include "compat.h"
@@ -366,11 +364,7 @@ struct bttv {
/* locking */
spinlock_t s_lock;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- struct semaphore lock;
-#else
struct mutex lock;
-#endif
int resources;
#ifdef VIDIOC_G_PRIORITY
struct v4l2_prio_state prio;
diff --git a/linux/drivers/media/video/bw-qcam.c b/linux/drivers/media/video/bw-qcam.c
index 787da47f5..e587fb332 100644
--- a/linux/drivers/media/video/bw-qcam.c
+++ b/linux/drivers/media/video/bw-qcam.c
@@ -75,9 +75,7 @@ OTHER DEALINGS IN THE SOFTWARE.
#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <asm/uaccess.h>
#include "bw-qcam.h"
diff --git a/linux/drivers/media/video/bw-qcam.h b/linux/drivers/media/video/bw-qcam.h
index f023c465f..6701dafbc 100644
--- a/linux/drivers/media/video/bw-qcam.h
+++ b/linux/drivers/media/video/bw-qcam.h
@@ -55,11 +55,7 @@ struct qcam_device {
struct video_device vdev;
struct pardevice *pdev;
struct parport *pport;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
int width, height;
int bpp;
int mode;
diff --git a/linux/drivers/media/video/c-qcam.c b/linux/drivers/media/video/c-qcam.c
index a5f5b8a4a..0755931e7 100644
--- a/linux/drivers/media/video/c-qcam.c
+++ b/linux/drivers/media/video/c-qcam.c
@@ -36,9 +36,7 @@
#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <linux/jiffies.h>
#include <asm/uaccess.h>
@@ -53,11 +51,7 @@ struct qcam_device {
int contrast, brightness, whitebal;
int top, left;
unsigned int bidirectional;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
};
/* cameras maximum */
diff --git a/linux/drivers/media/video/cpia.c b/linux/drivers/media/video/cpia.c
index 5d043643a..d5941cc15 100644
--- a/linux/drivers/media/video/cpia.c
+++ b/linux/drivers/media/video/cpia.c
@@ -37,9 +37,7 @@
#include <linux/pagemap.h>
#include <linux/delay.h>
#include <asm/io.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
diff --git a/linux/drivers/media/video/cpia.h b/linux/drivers/media/video/cpia.h
index d579b5edb..f90857a39 100644
--- a/linux/drivers/media/video/cpia.h
+++ b/linux/drivers/media/video/cpia.h
@@ -47,9 +47,7 @@
#include <linux/videodev.h>
#include <media/v4l2-common.h>
#include <linux/list.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "compat.h"
struct cpia_camera_ops
@@ -250,11 +248,7 @@ enum v4l_camstates {
struct cam_data {
struct list_head cam_data_list;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex busy_lock; /* guard against SMP multithreading */
-#else
- struct semaphore busy_lock; /* guard against SMP multithreading */
-#endif
struct cpia_camera_ops *ops; /* lowlevel driver operations */
void *lowlevel_data; /* private data for lowlevel driver */
u8 *raw_image; /* buffer for raw image data */
@@ -269,11 +263,7 @@ struct cam_data {
u8 mainsFreq; /* for flicker control */
/* proc interface */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex param_lock; /* params lock for this camera */
-#else
- struct semaphore param_lock; /* params lock for this camera */
-#endif
struct cam_params params; /* camera settings */
struct proc_dir_entry *proc_entry; /* /proc/cpia/videoX */
diff --git a/linux/drivers/media/video/cpia2/cpia2.h b/linux/drivers/media/video/cpia2/cpia2.h
index 24c47092e..bbb0e221f 100644
--- a/linux/drivers/media/video/cpia2/cpia2.h
+++ b/linux/drivers/media/video/cpia2/cpia2.h
@@ -379,11 +379,7 @@ struct cpia2_fh {
struct camera_data {
/* locks */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex busy_lock; /* guard against SMP multithreading */
-#else
- struct semaphore busy_lock;
-#endif
struct v4l2_prio_state prio;
/* camera status */
diff --git a/linux/drivers/media/video/cx18/cx18-driver.h b/linux/drivers/media/video/cx18/cx18-driver.h
index e4f1accd2..b78d0e38d 100644
--- a/linux/drivers/media/video/cx18/cx18-driver.h
+++ b/linux/drivers/media/video/cx18/cx18-driver.h
@@ -41,9 +41,7 @@
#include <linux/byteorder/swab.h>
#include <linux/pagemap.h>
#include <linux/workqueue.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
#include <linux/mutex.h>
-#endif
#include <linux/dvb/video.h>
#include <linux/dvb/audio.h>
@@ -232,13 +230,7 @@ struct cx18_dvb {
struct dvb_net dvbnet;
int enabled;
int feeding;
-
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
struct mutex feedlock;
-#else
- struct semaphore feedlock;
-#endif
-
};
struct cx18; /* forward reference */
@@ -383,11 +375,7 @@ struct cx18 {
/* Digitizer type */
int digitizer; /* 0x00EF = saa7114 0x00FO = saa7115 0x0106 = mic */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
struct mutex serialize_lock; /* mutex used to serialize open/close/start/stop/ioctl operations */
-#else
- struct semaphore serialize_lock;/* mutex used to serialize open/close/start/stop/ioctl operations */
-#endif
struct cx18_options options; /* User options */
int stream_buf_size[CX18_MAX_STREAMS]; /* Stream buffer size */
struct cx18_stream streams[CX18_MAX_STREAMS]; /* Stream data */
@@ -433,11 +421,7 @@ struct cx18 {
struct i2c_algo_bit_data i2c_algo[2];
struct cx18_i2c_algo_callback_data i2c_algo_cb_data[2];
struct i2c_client i2c_client[2];
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
struct mutex i2c_bus_lock[2];
-#else
- struct semaphore i2c_bus_lock[2];
-#endif
struct i2c_client *i2c_clients[I2C_CLIENTS_MAX];
/* gpio */
diff --git a/linux/drivers/media/video/cx23885/Kconfig b/linux/drivers/media/video/cx23885/Kconfig
index 7bf14c9a1..04e9640c2 100644
--- a/linux/drivers/media/video/cx23885/Kconfig
+++ b/linux/drivers/media/video/cx23885/Kconfig
@@ -14,6 +14,7 @@ config VIDEO_CX23885
select DVB_DIB7000P if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_MT2131 if !DVB_FE_CUSTOMISE
select DVB_S5H1409 if !DVB_FE_CUSTOMISE
+ select DVB_S5H1411 if !DVB_FE_CUSTOMISE
select DVB_LGDT330X if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMIZE
select MEDIA_TUNER_TDA8290 if !DVB_FE_CUSTOMIZE
diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c b/linux/drivers/media/video/cx23885/cx23885-dvb.c
index 2c1ae4d38..3c01ef2bf 100644
--- a/linux/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c
@@ -32,6 +32,7 @@
#include <media/v4l2-common.h>
#include "s5h1409.h"
+#include "s5h1411.h"
#include "mt2131.h"
#include "tda8290.h"
#include "tda18271.h"
@@ -175,6 +176,16 @@ static struct s5h1409_config dvico_s5h1409_config = {
.mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
};
+static struct s5h1411_config dvico_s5h1411_config = {
+ .output_mode = S5H1411_SERIAL_OUTPUT,
+ .gpio = S5H1411_GPIO_ON,
+ .qam_if = S5H1411_IF_44000,
+ .vsb_if = S5H1411_IF_44000,
+ .inversion = S5H1411_INVERSION_OFF,
+ .status_mode = S5H1411_DEMODLOCKING,
+ .mpeg_timing = S5H1411_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,
+};
+
static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
.i2c_address = 0x61,
.if_khz = 5380,
@@ -476,6 +487,10 @@ static int dvb_register(struct cx23885_tsport *port)
port->dvb.frontend = dvb_attach(s5h1409_attach,
&dvico_s5h1409_config,
&i2c_bus->i2c_adap);
+ if (port->dvb.frontend == NULL)
+ port->dvb.frontend = dvb_attach(s5h1411_attach,
+ &dvico_s5h1411_config,
+ &i2c_bus->i2c_adap);
if (port->dvb.frontend != NULL)
dvb_attach(xc5000_attach, port->dvb.frontend,
&i2c_bus->i2c_adap,
diff --git a/linux/drivers/media/video/cx23885/cx23885.h b/linux/drivers/media/video/cx23885/cx23885.h
index 11ad18af6..9a0b4bf3a 100644
--- a/linux/drivers/media/video/cx23885/cx23885.h
+++ b/linux/drivers/media/video/cx23885/cx23885.h
@@ -36,9 +36,7 @@
#include "media/cx2341x.h"
#include <linux/version.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#define CX23885_VERSION_CODE KERNEL_VERSION(0,0,1)
@@ -286,11 +284,7 @@ struct cx23885_dev {
struct cx23885_i2c i2c_bus[3];
int nr;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
/* board details */
unsigned int board;
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c
index 6efb1c61a..a63915bdf 100644
--- a/linux/drivers/media/video/cx88/cx88-core.c
+++ b/linux/drivers/media/video/cx88/cx88-core.c
@@ -37,9 +37,7 @@
#include <linux/delay.h>
#include "compat.h"
#include <linux/videodev2.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "cx88.h"
#include <media/v4l2-common.h>
diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c
index df615f19a..d7406a994 100644
--- a/linux/drivers/media/video/cx88/cx88-i2c.c
+++ b/linux/drivers/media/video/cx88/cx88-i2c.c
@@ -101,14 +101,8 @@ static int attach_inform(struct i2c_client *client)
{
struct cx88_core *core = i2c_get_adapdata(client->adapter);
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
- client->driver->name, client->addr, client->name);
-#else
dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
client->driver->driver.name, client->addr, client->name);
-#endif
-
return 0;
}
diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c
index 4796e3ba1..7d174382e 100644
--- a/linux/drivers/media/video/cx88/cx88-input.c
+++ b/linux/drivers/media/video/cx88/cx88-input.c
@@ -362,11 +362,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
input_dev->dev.parent = &pci->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &pci->dev;
-#else
- input_dev->dev = &pci->dev;
-#endif
#endif
/* record handles to ourself */
ir->core = core;
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index 161b3cc13..3e4b80617 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -41,9 +41,7 @@
#include "tuner-xc2028.h"
#include <linux/version.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#define CX88_VERSION_CODE KERNEL_VERSION(0,0,6)
#define UNSET (-1U)
@@ -345,11 +343,7 @@ struct cx88_core {
/* IR remote control state */
struct cx88_IR *ir;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
/* various v4l controls */
u32 freq;
diff --git a/linux/drivers/media/video/dabusb.c b/linux/drivers/media/video/dabusb.c
index 7f69d4043..4efe3f839 100644
--- a/linux/drivers/media/video/dabusb.c
+++ b/linux/drivers/media/video/dabusb.c
@@ -38,9 +38,7 @@
#include <linux/delay.h>
#include <linux/usb.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "dabusb.h"
#include "dabfirmware.h"
diff --git a/linux/drivers/media/video/dabusb.h b/linux/drivers/media/video/dabusb.h
index 761461910..00eb34c86 100644
--- a/linux/drivers/media/video/dabusb.h
+++ b/linux/drivers/media/video/dabusb.h
@@ -18,11 +18,7 @@ typedef enum { _stopped=0, _started } driver_state_t;
typedef struct
{
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
struct usb_device *usbdev;
wait_queue_head_t wait;
wait_queue_head_t remove_ok;
diff --git a/linux/drivers/media/video/em28xx/em28xx-dvb.c b/linux/drivers/media/video/em28xx/em28xx-dvb.c
index b8a5c61ce..adf2a6552 100644
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c
@@ -55,11 +55,7 @@ struct em28xx_dvb {
struct dvb_frontend *frontend;
/* feed count management */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
int nfeeds;
/* general boilerplate stuff */
diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c
index 4d6f650da..97853384c 100644
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c
@@ -519,9 +519,6 @@ static struct i2c_adapter em28xx_adap_template = {
static struct i2c_client em28xx_client_template = {
.name = "em28xx internal",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
- .flags = I2C_CLIENT_ALLOW_USE,
-#endif
};
/* ----------------------------------------------------------- */
diff --git a/linux/drivers/media/video/em28xx/em28xx-input.c b/linux/drivers/media/video/em28xx/em28xx-input.c
index e83e3bebd..8d21eaad9 100644
--- a/linux/drivers/media/video/em28xx/em28xx-input.c
+++ b/linux/drivers/media/video/em28xx/em28xx-input.c
@@ -205,11 +205,7 @@ void em28xx_register_snapshot_button(struct em28xx *dev)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
input_dev->dev.parent = &dev->udev->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
input_dev->cdev.dev = &dev->udev->dev;
-#else
- input_dev->dev = &dev->udev->dev;
-#endif
#endif
err = input_register_device(input_dev);
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index 5929d0860..4f7a51e66 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -34,9 +34,7 @@
#include <linux/i2c.h>
#include <linux/version.h>
#include <linux/mm.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
#include <linux/mutex.h>
-#endif
#include "em28xx.h"
#include <media/v4l2-common.h>
@@ -2341,9 +2339,6 @@ static void em28xx_usb_disconnect(struct usb_interface *interface)
}
static struct usb_driver em28xx_usb_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
- .owner = THIS_MODULE,
-#endif
.name = "em28xx",
.probe = em28xx_usb_probe,
.disconnect = em28xx_usb_disconnect,
diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h
index 18b3bc134..6db96db0f 100644
--- a/linux/drivers/media/video/em28xx/em28xx.h
+++ b/linux/drivers/media/video/em28xx/em28xx.h
@@ -30,9 +30,7 @@
#include <media/videobuf-vmalloc.h>
#include <linux/i2c.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
#include <linux/mutex.h>
-#endif
#include <media/ir-kbd-i2c.h>
#if defined(CONFIG_VIDEO_EM28XX_DVB) || defined(CONFIG_VIDEO_EM28XX_DVB_MODULE)
#include <media/videobuf-dvb.h>
@@ -395,11 +393,7 @@ struct em28xx {
struct work_struct request_module_wk;
/* locks */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15)
struct mutex lock;
-#else
- struct semaphore lock, fileop_lock;
-#endif
/* spinlock_t queue_lock; */
struct list_head inqueue, outqueue;
wait_queue_head_t open, wait_frame, wait_stream;
diff --git a/linux/drivers/media/video/et61x251/et61x251.h b/linux/drivers/media/video/et61x251/et61x251.h
index 64ff5de0d..d39eabc9d 100644
--- a/linux/drivers/media/video/et61x251/et61x251.h
+++ b/linux/drivers/media/video/et61x251/et61x251.h
@@ -34,9 +34,7 @@
#include <linux/types.h>
#include <linux/param.h>
#include <linux/rwsem.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <linux/stddef.h>
#include <linux/string.h>
#include <linux/kref.h>
@@ -167,11 +165,7 @@ struct et61x251_device {
u8 users;
struct completion probe;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex open_mutex, fileop_mutex;
-#else
- struct semaphore open_mutex, fileop_mutex;
-#endif
spinlock_t queue_lock;
wait_queue_head_t wait_open, wait_frame, wait_stream;
};
diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c
index 85806fe10..fc668f5b5 100644
--- a/linux/drivers/media/video/ir-kbd-i2c.c
+++ b/linux/drivers/media/video/ir-kbd-i2c.c
@@ -328,15 +328,9 @@ static int ir_detach(struct i2c_client *client);
static int ir_probe(struct i2c_adapter *adap);
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "ir-kbd-i2c",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "ir-kbd-i2c",
},
-#endif
.id = I2C_DRIVERID_INFRARED,
.attach_adapter = ir_probe,
.detach_client = ir_detach,
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.h b/linux/drivers/media/video/ivtv/ivtv-driver.h
index 5134d8a09..7bae21e5b 100644
--- a/linux/drivers/media/video/ivtv/ivtv-driver.h
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.h
@@ -53,9 +53,7 @@
#include <linux/pagemap.h>
#include <linux/scatterlist.h>
#include <linux/workqueue.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -274,11 +272,7 @@ struct ivtv_sg_host_element {
};
struct ivtv_user_dma {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
int page_count;
struct page *map[IVTV_DMA_SG_OSD_ENT];
/* Needed when dealing with highmem userspace buffers */
@@ -640,12 +634,7 @@ struct ivtv {
/* Locking */
spinlock_t lock; /* lock access to this struct */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex serialize_lock; /* mutex used to serialize open/close/start/stop/ioctl operations */
-#else
- struct semaphore serialize_lock;/* mutex used to serialize open/close/start/stop/ioctl operations */
-#endif
-
/* Streams */
int stream_buf_size[IVTV_MAX_STREAMS]; /* stream buffer size */
@@ -686,11 +675,7 @@ struct ivtv {
struct i2c_client i2c_client;
struct i2c_client *i2c_clients[I2C_CLIENTS_MAX];/* pointers to all I2C clients */
int i2c_state; /* i2c bit state */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex i2c_bus_lock; /* lock i2c bus */
-#else
- struct semaphore i2c_bus_lock; /* lock i2c bus */
-#endif
/* Program Index information */
diff --git a/linux/drivers/media/video/meye.h b/linux/drivers/media/video/meye.h
index c5c8d0a0a..4c0c031d3 100644
--- a/linux/drivers/media/video/meye.h
+++ b/linux/drivers/media/video/meye.h
@@ -263,9 +263,7 @@
/* private API definitions */
#include <linux/meye.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
/* Enable jpg software correction */
@@ -308,11 +306,7 @@ struct meye {
/* list of buffers */
struct meye_grab_buffer grab_buffer[MEYE_MAX_BUFNBRS];
int vma_use_count[MEYE_MAX_BUFNBRS]; /* mmap count */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock; /* mutex for open/mmap... */
-#else
- struct semaphore lock; /* mutex for open/mmap... */
-#endif
struct kfifo *grabq; /* queue for buffers to be grabbed */
spinlock_t grabq_lock; /* lock protecting the queue */
struct kfifo *doneq; /* queue for grabbed buffers */
diff --git a/linux/drivers/media/video/ov511.h b/linux/drivers/media/video/ov511.h
index e797d3c9c..62f0cb4d7 100644
--- a/linux/drivers/media/video/ov511.h
+++ b/linux/drivers/media/video/ov511.h
@@ -6,12 +6,7 @@
#include <linux/videodev.h>
#include <media/v4l2-common.h>
#include <linux/usb.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#else
-/* Having a version check for each mutex defined is annoying */
-#define mutex semaphore
-#endif
#define OV511_DEBUG /* Turn on debug messages */
diff --git a/linux/drivers/media/video/planb.c b/linux/drivers/media/video/planb.c
index 282c9dd27..358dc2996 100644
--- a/linux/drivers/media/video/planb.c
+++ b/linux/drivers/media/video/planb.c
@@ -50,9 +50,7 @@
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/irq.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
#include <linux/mutex.h>
-#endif
#include "planb.h"
#include "saa7196.h"
diff --git a/linux/drivers/media/video/planb.h b/linux/drivers/media/video/planb.h
index 944e4960a..e21b5735c 100644
--- a/linux/drivers/media/video/planb.h
+++ b/linux/drivers/media/video/planb.h
@@ -174,11 +174,7 @@ struct planb {
int user;
unsigned int tab_size;
int maxlines;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
unsigned int irq; /* interrupt number */
volatile unsigned int intr_mask;
struct pci_dev *dev; /* Our PCI device */
diff --git a/linux/drivers/media/video/pms.c b/linux/drivers/media/video/pms.c
index c10296c07..bf9858257 100644
--- a/linux/drivers/media/video/pms.c
+++ b/linux/drivers/media/video/pms.c
@@ -31,9 +31,7 @@
#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <asm/uaccess.h>
@@ -49,11 +47,7 @@ struct pms_device
struct video_picture picture;
int height;
int width;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
};
struct i2c_info
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-context.h b/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
index c7cbc28a8..61801291c 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
@@ -19,11 +19,7 @@
#ifndef __PVRUSB2_BASE_H
#define __PVRUSB2_BASE_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <linux/mutex.h>
-#else
-#include <asm/semaphore.h>
-#endif
#include <linux/usb.h>
#include <linux/workqueue.h>
@@ -49,11 +45,7 @@ struct pvr2_context {
struct pvr2_context *notify_prev;
struct pvr2_hdw *hdw;
struct pvr2_context_stream video_stream;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
int notify_flag;
int initialized_flag;
int disconnect_flag;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
index 5c8942e93..3b982d963 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
@@ -23,11 +23,7 @@
#include "compat.h"
#include <linux/errno.h>
#include <linux/string.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <linux/mutex.h>
-#else
-#include <asm/semaphore.h>
-#endif
static int pvr2_ctrl_range_check(struct pvr2_ctrl *cptr,int val)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.h b/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.h
index c13ecfb13..884ff916a 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-dvb.h
@@ -23,11 +23,7 @@ struct pvr2_dvb_adapter {
int max_feed_count;
struct task_struct *thread;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
unsigned int stream_run:1;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index f75dd1613..657f86159 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -35,11 +35,7 @@
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <linux/workqueue.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <linux/mutex.h>
-#else
-#include <asm/semaphore.h>
-#endif
#include "pvrusb2-hdw.h"
#include "pvrusb2-io.h"
#include <media/cx2341x.h>
@@ -195,11 +191,7 @@ struct pvr2_hdw {
struct pvr2_stream *vid_stream;
/* Mutex for all hardware state control */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
struct mutex big_lock_mutex;
-#else
- struct semaphore big_lock_mutex;
-#endif
int big_lock_held; /* For debugging */
char name[32];
@@ -215,22 +207,14 @@ struct pvr2_hdw {
unsigned long i2c_stale_mask; /* Pending broadcast change bits */
unsigned long i2c_active_mask; /* All change bits currently in use */
struct list_head i2c_clients;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
struct mutex i2c_list_lock;
-#else
- struct semaphore i2c_list_lock;
-#endif
/* Frequency table */
unsigned int freqTable[FREQTABLE_SIZE];
unsigned int freqProgSlot;
/* Stuff for handling low level control interaction with device */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
struct mutex ctl_lock_mutex;
-#else
- struct semaphore ctl_lock_mutex;
-#endif
int ctl_lock_held; /* For debugging */
struct urb *ctl_write_urb;
struct urb *ctl_read_urb;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index 797017066..ef741d1fc 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -606,17 +606,9 @@ static int pvr2_i2c_core_singleton(struct i2c_client *cp,
if (!cp) return -EINVAL;
if (!(cp->driver)) return -EINVAL;
if (!(cp->driver->command)) return -EINVAL;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
- if (!try_module_get(cp->driver->owner)) return -EAGAIN;
-#else
if (!try_module_get(cp->driver->driver.owner)) return -EAGAIN;
-#endif
stat = cp->driver->command(cp,cmd,arg);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
- module_put(cp->driver->owner);
-#else
module_put(cp->driver->driver.owner);
-#endif
return stat;
}
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
index bf7bd5906..2bc69812d 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
@@ -23,11 +23,7 @@
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/slab.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <linux/mutex.h>
-#else
-#include <asm/semaphore.h>
-#endif
#include "compat.h"
static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state);
@@ -91,11 +87,7 @@ struct pvr2_stream {
int endpoint;
/* Overhead for mutex enforcement */
spinlock_t list_lock;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
/* Tracking state for tolerating errors */
unsigned int fail_count;
unsigned int fail_tolerance;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
index fb3ad639f..fa599a1bf 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
@@ -23,11 +23,7 @@
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/slab.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <linux/mutex.h>
-#else
-#include <asm/semaphore.h>
-#endif
#include <asm/uaccess.h>
#include "compat.h"
@@ -51,11 +47,7 @@ struct pvr2_ioread {
char *c_data_ptr;
unsigned int c_data_len;
unsigned int c_data_offs;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
};
static int pvr2_ioread_init(struct pvr2_ioread *cp)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
index ff85b381c..9a3ad0905 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
@@ -107,9 +107,6 @@ static void pvr_disconnect(struct usb_interface *intf)
}
static struct usb_driver pvr_driver = {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
- .owner = THIS_MODULE,
-#endif
.name = "pvrusb2",
.id_table = pvr2_device_table,
.probe = pvr_probe,
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
index f6ace8abe..90cb36435 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
@@ -776,9 +776,7 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void)
#else
clp->class.dev_release = pvr2_sysfs_release;
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
- clp->class.hotplug = pvr2_sysfs_hotplug;
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
clp->class.uevent = pvr2_sysfs_hotplug;
#endif
if (class_register(&clp->class)) {
diff --git a/linux/drivers/media/video/pwc/pwc.h b/linux/drivers/media/video/pwc/pwc.h
index c5fe0e13d..d01548d2c 100644
--- a/linux/drivers/media/video/pwc/pwc.h
+++ b/linux/drivers/media/video/pwc/pwc.h
@@ -31,11 +31,7 @@
#include <linux/wait.h>
#include <linux/smp_lock.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <linux/mutex.h>
-#else
-#include <asm/semaphore.h>
-#endif
#include <asm/errno.h>
#include "compat.h"
#include <linux/videodev.h>
@@ -250,11 +246,7 @@ struct pwc_device
int image_read_pos; /* In case we read data in pieces, keep track of were we are in the imagebuffer */
int image_used[MAX_IMAGES]; /* For MCAPTURE and SYNC */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
struct mutex modlock; /* to prevent races in video_open(), etc */
-#else
- struct semaphore modlock; /* to prevent races in video_open(), etc */
-#endif
spinlock_t ptrlock; /* for manipulating the buffer pointers */
/*** motorized pan/tilt feature */
diff --git a/linux/drivers/media/video/saa5246a.c b/linux/drivers/media/video/saa5246a.c
index 2ea5d70a9..59b95caef 100644
--- a/linux/drivers/media/video/saa5246a.c
+++ b/linux/drivers/media/video/saa5246a.c
@@ -47,9 +47,7 @@
#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "saa5246a.h"
@@ -62,11 +60,7 @@ struct saa5246a_device
u8 pgbuf[NUM_DAUS][VTX_VIRTUALSIZE];
int is_searching[NUM_DAUS];
struct i2c_client *client;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
};
static struct video_device saa_template; /* Declared near bottom */
diff --git a/linux/drivers/media/video/saa5249.c b/linux/drivers/media/video/saa5249.c
index 4443a023c..3bc0f0604 100644
--- a/linux/drivers/media/video/saa5249.c
+++ b/linux/drivers/media/video/saa5249.c
@@ -58,9 +58,7 @@
#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <asm/io.h>
@@ -111,11 +109,7 @@ struct saa5249_device
int disp_mode;
int virtual_mode;
struct i2c_client *client;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
};
diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c
index 5efa5ab66..ab41d9526 100644
--- a/linux/drivers/media/video/saa6588.c
+++ b/linux/drivers/media/video/saa6588.c
@@ -500,15 +500,9 @@ static int saa6588_command(struct i2c_client *client, unsigned int cmd,
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "saa6588",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "saa6588",
},
-#endif
.id = -1, /* FIXME */
.attach_adapter = saa6588_probe,
.detach_client = saa6588_detach,
@@ -517,9 +511,6 @@ static struct i2c_driver driver = {
static struct i2c_client client_template = {
.name = "saa6588",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .flags = I2C_CLIENT_ALLOW_USE,
-#endif
.driver = &driver,
};
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c
index 0143c8b28..c5c19a2e3 100644
--- a/linux/drivers/media/video/saa7134/saa6752hs.c
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c
@@ -797,15 +797,9 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "saa6752hs",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "saa6752hs",
},
-#endif
.id = I2C_DRIVERID_SAA6752HS,
.attach_adapter = saa6752hs_probe,
.detach_client = saa6752hs_detach,
@@ -815,9 +809,6 @@ static struct i2c_driver driver = {
static struct i2c_client client_template =
{
.name = "saa6752hs",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .flags = I2C_CLIENT_ALLOW_USE,
-#endif
.driver = &driver,
};
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index 511941bca..8f3d280af 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -29,9 +29,7 @@
#include <linux/sound.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <linux/dma-mapping.h>
#include <linux/pm.h>
diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c
index 610e506b5..bdec276e0 100644
--- a/linux/drivers/media/video/saa7134/saa7134-i2c.c
+++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c
@@ -331,11 +331,7 @@ static int attach_inform(struct i2c_client *client)
struct saa7134_dev *dev = client->adapter->algo_data;
d1printk( "%s i2c attach [addr=0x%x,client=%s]\n",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- client->driver->name, client->addr, client->name);
-#else
client->driver->driver.name, client->addr, client->name);
-#endif
if (client->addr == 0x20 && client->driver && client->driver->command)
dev->mpeg_i2c_client = client;
@@ -349,11 +345,7 @@ static int attach_inform(struct i2c_client *client)
{
struct IR_i2c *ir = i2c_get_clientdata(client);
d1printk("%s i2c IR detected (%s).\n",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- client->driver->name,ir->phys);
-#else
client->driver->driver.name, ir->phys);
-#endif
saa7134_set_i2c_ir(dev,ir);
break;
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c
index c12184a38..0ad81e690 100644
--- a/linux/drivers/media/video/saa7134/saa7134-input.c
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c
@@ -476,11 +476,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
input_dev->dev.parent = &dev->pci->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &dev->pci->dev;
-#else
- input_dev->dev = &dev->pci->dev;
-#endif
#endif
dev->remote = ir;
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 08bc1d0fa..6afbc0c57 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -29,9 +29,7 @@
#include <linux/input.h>
#include <linux/notifier.h>
#include <linux/delay.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <asm/io.h>
@@ -415,11 +413,7 @@ struct saa7134_fh {
/* dmasound dsp status */
struct saa7134_dmasound {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
int minor_mixer;
int minor_dsp;
unsigned int users_dsp;
@@ -473,11 +467,7 @@ struct saa7134_mpeg_ops {
/* global device status */
struct saa7134_dev {
struct list_head devlist;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
spinlock_t slock;
struct v4l2_prio_state prio;
/* workstruct for loading modules */
diff --git a/linux/drivers/media/video/se401.h b/linux/drivers/media/video/se401.h
index bdbb20f75..81f2c2c74 100644
--- a/linux/drivers/media/video/se401.h
+++ b/linux/drivers/media/video/se401.h
@@ -6,9 +6,7 @@
#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#define se401_DEBUG /* Turn on debug messages */
@@ -193,11 +191,7 @@ struct usb_se401 {
int maxframesize;
int cframesize; /* current framesize */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
int user; /* user count for exclusive use */
int removed; /* device disconnected */
diff --git a/linux/drivers/media/video/sn9c102/sn9c102.h b/linux/drivers/media/video/sn9c102/sn9c102.h
index c6e41428d..491a803e5 100644
--- a/linux/drivers/media/video/sn9c102/sn9c102.h
+++ b/linux/drivers/media/video/sn9c102/sn9c102.h
@@ -33,9 +33,7 @@
#include <linux/types.h>
#include <linux/param.h>
#include <linux/rwsem.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <linux/string.h>
#include <linux/stddef.h>
#include <linux/kref.h>
@@ -131,11 +129,7 @@ struct sn9c102_device {
u8 users;
struct completion probe;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex open_mutex, fileop_mutex;
-#else
- struct semaphore open_mutex, fileop_mutex;
-#endif
spinlock_t queue_lock;
wait_queue_head_t wait_open, wait_frame, wait_stream;
};
diff --git a/linux/drivers/media/video/stv680.c b/linux/drivers/media/video/stv680.c
index 8bc396533..7aa94abfd 100644
--- a/linux/drivers/media/video/stv680.c
+++ b/linux/drivers/media/video/stv680.c
@@ -67,9 +67,7 @@
#include <linux/videodev.h>
#include <media/v4l2-common.h>
#include <linux/usb.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "compat.h"
#include "stv680.h"
diff --git a/linux/drivers/media/video/stv680.h b/linux/drivers/media/video/stv680.h
index cbbcd4f25..a08f1b08a 100644
--- a/linux/drivers/media/video/stv680.h
+++ b/linux/drivers/media/video/stv680.h
@@ -118,11 +118,7 @@ struct usb_stv {
int origGain;
int origMode; /* original camera mode */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock; /* to lock the structure */
-#else
- struct semaphore lock; /* to lock the structure */
-#endif
int user; /* user count for exclusive use */
int removed; /* device disconnected */
int streaming; /* Are we streaming video? */
diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c
index 1305820d2..29bcbd0f7 100644
--- a/linux/drivers/media/video/tda7432.c
+++ b/linux/drivers/media/video/tda7432.c
@@ -509,15 +509,9 @@ static int tda7432_command(struct i2c_client *client,
}
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "tda7432",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "tda7432",
},
-#endif
.id = I2C_DRIVERID_TDA7432,
.attach_adapter = tda7432_probe,
.detach_client = tda7432_detach,
diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c
index 537a06492..f4ebfd84b 100644
--- a/linux/drivers/media/video/tda9840.c
+++ b/linux/drivers/media/video/tda9840.c
@@ -35,13 +35,9 @@
static int debug; /* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-#define dprintk(args...) \
- do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __func__, __LINE__); printk(args); } } while (0)
-#else
+
#define dprintk(args...) \
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __func__, __LINE__); printk(args); } } while (0)
-#endif
#define SWITCH 0x00
#define LEVEL_ADJUST 0x02
@@ -228,15 +224,9 @@ static int detach(struct i2c_client *client)
}
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "tda9840",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "tda9840",
},
-#endif
.id = I2C_DRIVERID_TDA9840,
.attach_adapter = attach,
.detach_client = detach,
diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c
index 86e721656..5c3d43082 100644
--- a/linux/drivers/media/video/tda9875.c
+++ b/linux/drivers/media/video/tda9875.c
@@ -433,15 +433,9 @@ static int tda9875_command(struct i2c_client *client,
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "tda9875",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "tda9875",
},
-#endif
.id = I2C_DRIVERID_TDA9875,
.attach_adapter = tda9875_probe,
.detach_client = tda9875_detach,
diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c
index cb700dde7..da654bd15 100644
--- a/linux/drivers/media/video/tea6415c.c
+++ b/linux/drivers/media/video/tea6415c.c
@@ -37,13 +37,9 @@
static int debug; /* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-#define dprintk(args...) \
- do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __func__, __LINE__); printk(args); } } while (0)
-#else
+
#define dprintk(args...) \
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __func__, __LINE__); printk(args); } } while (0)
-#endif
#define TEA6415C_NUM_INPUTS 8
#define TEA6415C_NUM_OUTPUTS 6
@@ -197,15 +193,9 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
}
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "tea6415c",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "tea6415c",
},
-#endif
.id = I2C_DRIVERID_TEA6415C,
.attach_adapter = attach,
.detach_client = detach,
diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c
index f1bba1568..d0c63703c 100644
--- a/linux/drivers/media/video/tea6420.c
+++ b/linux/drivers/media/video/tea6420.c
@@ -37,13 +37,9 @@
static int debug; /* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-#define dprintk(args...) \
- do { if (debug) { printk("%s: %s()[%d]: ",__stringify(KBUILD_MODNAME), __func__, __LINE__); printk(args); } } while (0)
-#else
+
#define dprintk(args...) \
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __func__, __LINE__); printk(args); } } while (0)
-#endif
/* addresses to scan, found only at 0x4c and/or 0x4d (7-Bit) */
static unsigned short normal_i2c[] = { I2C_ADDR_TEA6420_1, I2C_ADDR_TEA6420_2, I2C_CLIENT_END };
@@ -173,15 +169,9 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
}
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "tea6420",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "tea6420",
},
-#endif
.id = I2C_DRIVERID_TEA6420,
.attach_adapter = attach,
.detach_client = detach,
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index d80f7ee91..60d26aa03 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -32,11 +32,7 @@
#define UNSET (-1U)
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
-#define PREFIX t->i2c->driver->name
-#else
#define PREFIX t->i2c->driver->driver.name
-#endif
/** This macro allows us to probe dynamically, avoiding static links */
#ifdef CONFIG_MEDIA_ATTACH
@@ -500,15 +496,9 @@ static void set_type(struct i2c_client *c, unsigned int type,
set_freq(c, (V4L2_TUNER_RADIO == t->mode) ?
t->radio_freq : t->tv_freq);
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n",
- c->adapter->name, c->driver->name, c->addr << 1, type,
- t->mode_mask);
-#else
tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n",
c->adapter->name, c->driver->driver.name, c->addr << 1, type,
t->mode_mask);
-#endif
tuner_i2c_address_check(t);
return;
diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c
index 2862efa93..b50e0942e 100644
--- a/linux/drivers/media/video/tvmixer.c
+++ b/linux/drivers/media/video/tvmixer.c
@@ -216,15 +216,9 @@ static int tvmixer_release(struct inode *inode, struct file *file)
}
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "tvmixer",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "tvmixer",
},
-#endif
.id = I2C_DRIVERID_TVMIXER,
#ifndef I2C_DF_DUMMY
.detach_adapter = tvmixer_adapters,
diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c
index 3c0e2b316..6ac63245d 100644
--- a/linux/drivers/media/video/tvp5150.c
+++ b/linux/drivers/media/video/tvp5150.c
@@ -32,21 +32,6 @@ static int debug;
module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "Debug level (0-1)");
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-#define tvp5150_err(fmt, arg...) do { \
- printk(KERN_INFO "%s %d-%04x: " fmt, c->driver->name, \
- i2c_adapter_id(c->adapter), c->addr , ## arg); } while (0)
-#define tvp5150_info(fmt, arg...) do { \
- printk(KERN_INFO "%s %d-%04x: " fmt, c->driver->name, \
- i2c_adapter_id(c->adapter), c->addr , ## arg); } while (0)
-#define tvp5150_dbg(num, fmt, arg...) \
- do { \
- if (debug >= num) \
- printk(KERN_DEBUG "%s debug %d-%04x: " fmt,\
- c->driver->name, \
- i2c_adapter_id(c->adapter), \
- c->addr , ## arg); } while (0)
-#else
#define tvp5150_err(fmt, arg...) do { \
printk(KERN_ERR "%s %d-%04x: " fmt, c->driver->driver.name, \
i2c_adapter_id(c->adapter), c->addr , ## arg); } while (0)
@@ -60,7 +45,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
c->driver->driver.name, \
i2c_adapter_id(c->adapter), \
c->addr , ## arg); } while (0)
-#endif
/* supported controls */
static struct v4l2_queryctrl tvp5150_qctrl[] = {
@@ -1133,9 +1117,6 @@ static struct i2c_driver driver;
static struct i2c_client client_template = {
.name = "(unset)",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .flags = I2C_CLIENT_ALLOW_USE,
-#endif
.driver = &driver,
};
@@ -1225,15 +1206,9 @@ static int tvp5150_detach_client(struct i2c_client *c)
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
- .name = "tvp5150",
- .flags = I2C_DF_NOTIFY,
-#else
.driver = {
.name = "tvp5150",
},
-#endif
.id = I2C_DRIVERID_TVP5150,
.attach_adapter = tvp5150_attach_adapter,
diff --git a/linux/drivers/media/video/usbvideo/konicawc.c b/linux/drivers/media/video/usbvideo/konicawc.c
index 6fef59557..25f9b4286 100644
--- a/linux/drivers/media/video/usbvideo/konicawc.c
+++ b/linux/drivers/media/video/usbvideo/konicawc.c
@@ -244,11 +244,7 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
input_dev->dev.parent = &dev->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &dev->dev;
-#else
- input_dev->dev = &dev->dev;
-#endif
#endif
input_dev->evbit[0] = BIT_MASK(EV_KEY);
diff --git a/linux/drivers/media/video/usbvideo/quickcam_messenger.c b/linux/drivers/media/video/usbvideo/quickcam_messenger.c
index 69f0fc770..f079e8d66 100644
--- a/linux/drivers/media/video/usbvideo/quickcam_messenger.c
+++ b/linux/drivers/media/video/usbvideo/quickcam_messenger.c
@@ -108,11 +108,7 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
input_dev->dev.parent = &dev->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &dev->dev;
-#else
- input_dev->dev = &dev->dev;
-#endif
#endif
input_dev->evbit[0] = BIT_MASK(EV_KEY);
diff --git a/linux/drivers/media/video/usbvideo/usbvideo.h b/linux/drivers/media/video/usbvideo/usbvideo.h
index c1f892825..03b3add3d 100644
--- a/linux/drivers/media/video/usbvideo/usbvideo.h
+++ b/linux/drivers/media/video/usbvideo/usbvideo.h
@@ -19,9 +19,7 @@
#include <linux/videodev.h>
#include <media/v4l2-common.h>
#include <linux/usb.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "compat.h"
/* Most helpful debugging aid */
@@ -217,11 +215,7 @@ struct uvd {
unsigned long flags; /* FLAGS_USBVIDEO_xxx */
unsigned long paletteBits; /* Which palettes we accept? */
unsigned short defaultPalette; /* What palette to use for read() */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
int user; /* user count for exclusive use */
videosize_t videosize; /* Current setting */
@@ -280,11 +274,7 @@ struct usbvideo {
int num_cameras; /* As allocated */
struct usb_driver usbdrv; /* Interface to the USB stack */
char drvName[80]; /* Driver name */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock; /* Mutex protecting camera structures */
-#else
- struct semaphore lock;
-#endif
struct usbvideo_cb cb; /* Table of callbacks (virtual methods) */
struct video_device vdt; /* Video device template */
struct uvd *cam; /* Array of camera structures */
diff --git a/linux/drivers/media/video/usbvideo/vicam.c b/linux/drivers/media/video/usbvideo/vicam.c
index 049f588ae..17f542dfb 100644
--- a/linux/drivers/media/video/usbvideo/vicam.c
+++ b/linux/drivers/media/video/usbvideo/vicam.c
@@ -42,9 +42,7 @@
#include <linux/usb.h>
#include <linux/vmalloc.h>
#include <linux/slab.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "usbvideo.h"
// #define VICAM_DEBUG
@@ -406,11 +404,7 @@ struct vicam_camera {
struct usb_device *udev; // usb device
/* guard against simultaneous accesses to the camera */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex cam_lock;
-#else
- struct semaphore cam_lock;
-#endif
int is_initialized;
u8 open_count;
diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c
index 1b6180573..9d2f6b985 100644
--- a/linux/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c
@@ -29,9 +29,7 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
#include <linux/utsname.h>
-#endif
#include <linux/init.h>
#include <asm/uaccess.h>
#include <linux/ioport.h>
@@ -521,9 +519,6 @@ static struct i2c_adapter i2c_adap_template = {
static struct i2c_client i2c_client_template = {
.name = "usbvision internal",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .flags = I2C_CLIENT_ALLOW_USE,
-#endif
};
/*
diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c
index 073d30454..cd6c41d67 100644
--- a/linux/drivers/media/video/usbvision/usbvision-video.c
+++ b/linux/drivers/media/video/usbvision/usbvision-video.c
@@ -1625,19 +1625,10 @@ static struct usb_usbvision *usbvision_alloc(struct usb_device *dev)
{
struct usb_usbvision *usbvision;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
- if ((usbvision = kmalloc(sizeof(struct usb_usbvision), GFP_KERNEL)) ==
- NULL) {
- goto err_exit;
- }
-
- memset(usbvision, 0, sizeof(struct usb_usbvision));
-#else
if ((usbvision = kzalloc(sizeof(struct usb_usbvision), GFP_KERNEL)) ==
NULL) {
goto err_exit;
}
-#endif
usbvision->dev = dev;
@@ -1900,9 +1891,6 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf)
}
static struct usb_driver usbvision_driver = {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
- .owner = THIS_MODULE,
-#endif
.name = "usbvision",
.id_table = usbvision_table,
.probe = usbvision_probe,
diff --git a/linux/drivers/media/video/usbvision/usbvision.h b/linux/drivers/media/video/usbvision/usbvision.h
index 371c6987f..590ff1e19 100644
--- a/linux/drivers/media/video/usbvision/usbvision.h
+++ b/linux/drivers/media/video/usbvision/usbvision.h
@@ -34,9 +34,7 @@
#include <linux/list.h>
#include <linux/usb.h>
#include <linux/i2c.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <media/v4l2-common.h>
#include <media/tuner.h>
#include <linux/videodev2.h>
@@ -395,11 +393,7 @@ struct usb_usbvision {
unsigned char iface; /* Video interface number */
unsigned char ifaceAlt; /* Alt settings */
unsigned char Vin_Reg2_Preset;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
struct timer_list powerOffTimer;
struct work_struct powerOffWork;
int power; /* is the device powered on? */
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c
index c8b3da9f6..1e795e928 100644
--- a/linux/drivers/media/video/v4l2-common.c
+++ b/linux/drivers/media/video/v4l2-common.c
@@ -724,9 +724,6 @@ int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver
client->addr = address;
client->adapter = adapter;
client->driver = driver;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- client->flags = I2C_CLIENT_ALLOW_USE;
-#endif
strlcpy(client->name, name, sizeof(client->name));
err = probe(client, NULL);
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index 91fcf1695..7ac11d5fb 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -42,9 +42,6 @@
#include <linux/slab.h>
#include <asm/uaccess.h>
#include <asm/system.h>
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-#include <asm/semaphore.h>
-#endif
#define __OLD_VIDIOC_ /* To allow fixing old calls*/
#include <linux/videodev2.h>
diff --git a/linux/drivers/media/video/vino.c b/linux/drivers/media/video/vino.c
index bf15e2eb2..60527b164 100644
--- a/linux/drivers/media/video/vino.c
+++ b/linux/drivers/media/video/vino.c
@@ -41,9 +41,7 @@
#include <linux/videodev.h>
#include <media/v4l2-common.h>
#include <linux/video_decoder.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
#include <linux/mutex.h>
-#endif
#include <asm/paccess.h>
#include <asm/io.h>
@@ -247,11 +245,7 @@ struct vino_framebuffer_queue {
struct vino_framebuffer *buffer[VINO_FRAMEBUFFER_COUNT_MAX];
spinlock_t queue_lock;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
struct mutex queue_mutex;
-#else
- struct semaphore queue_mutex;
-#endif
wait_queue_head_t frame_wait_queue;
};
@@ -289,11 +283,7 @@ struct vino_channel_settings {
/* the driver is currently processing the queue */
int capturing;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
spinlock_t capture_lock;
unsigned int users;
diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c
index 98ee2225c..78108a4e0 100644
--- a/linux/drivers/media/video/vivi.c
+++ b/linux/drivers/media/video/vivi.c
@@ -25,11 +25,7 @@
#include <linux/pci.h>
#include <linux/random.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
#include <linux/mutex.h>
-#else
-#include <asm/semaphore.h>
-#endif
#include "compat.h"
#include <linux/videodev2.h>
#include <linux/dma-mapping.h>
diff --git a/linux/drivers/media/video/w9968cf.h b/linux/drivers/media/video/w9968cf.h
index 8e1742cb7..15ea445e5 100644
--- a/linux/drivers/media/video/w9968cf.h
+++ b/linux/drivers/media/video/w9968cf.h
@@ -31,12 +31,7 @@
#include <linux/param.h>
#include <linux/types.h>
#include <linux/rwsem.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#else
-/* Having a version check for each mutex defined is annoying */
-#define mutex semaphore
-#endif
#include <media/ovcamchip.h>
#include "compat.h"
diff --git a/linux/drivers/media/video/zc0301/zc0301.h b/linux/drivers/media/video/zc0301/zc0301.h
index d0e258176..a7c7b1116 100644
--- a/linux/drivers/media/video/zc0301/zc0301.h
+++ b/linux/drivers/media/video/zc0301/zc0301.h
@@ -33,9 +33,7 @@
#include <linux/wait.h>
#include <linux/types.h>
#include <linux/param.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <linux/rwsem.h>
#include <linux/stddef.h>
#include <linux/string.h>
@@ -130,11 +128,7 @@ struct zc0301_device {
u8 users;
struct completion probe;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex open_mutex, fileop_mutex;
-#else
- struct semaphore open_mutex, fileop_mutex;
-#endif
spinlock_t queue_lock;
wait_queue_head_t wait_open, wait_frame, wait_stream;
};
diff --git a/linux/drivers/media/video/zoran.h b/linux/drivers/media/video/zoran.h
index baa5f423d..46b7ad477 100644
--- a/linux/drivers/media/video/zoran.h
+++ b/linux/drivers/media/video/zoran.h
@@ -390,11 +390,7 @@ struct zoran {
struct videocodec *codec; /* video codec */
struct videocodec *vfe; /* video front end */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex resource_lock; /* prevent evil stuff */
-#else
- struct semaphore resource_lock; /* prevent evil stuff */
-#endif
u8 initialized; /* flag if zoran has been correctly initalized */
int user; /* number of current users */
diff --git a/linux/drivers/media/video/zoran_card.c b/linux/drivers/media/video/zoran_card.c
index b517ce4f1..56d8edecc 100644
--- a/linux/drivers/media/video/zoran_card.c
+++ b/linux/drivers/media/video/zoran_card.c
@@ -50,9 +50,7 @@
#include <linux/interrupt.h>
#include <linux/video_decoder.h>
#include <linux/video_encoder.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <asm/io.h>
diff --git a/linux/drivers/media/video/zoran_driver.c b/linux/drivers/media/video/zoran_driver.c
index 73546a20d..844c688e8 100644
--- a/linux/drivers/media/video/zoran_driver.c
+++ b/linux/drivers/media/video/zoran_driver.c
@@ -81,9 +81,7 @@
#include <linux/video_decoder.h>
#include <linux/video_encoder.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "zoran.h"
#include "zoran_device.h"
#include "zoran_card.h"
diff --git a/linux/drivers/media/video/zr364xx.c b/linux/drivers/media/video/zr364xx.c
index 2e7cf6f26..b1a65e3f5 100644
--- a/linux/drivers/media/video/zr364xx.c
+++ b/linux/drivers/media/video/zr364xx.c
@@ -115,11 +115,7 @@ struct zr364xx_camera {
int width;
int height;
int method;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
};