summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/pvrusb2')
-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
9 files changed, 1 insertions, 62 deletions
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)) {