summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c4
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-ci.c8
-rw-r--r--linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c10
-rw-r--r--linux/drivers/media/video/ir-kbd-i2c.c2
-rw-r--r--v4l/compat.h22
5 files changed, 34 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 0de98c3eb..4b092d7c2 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -868,7 +868,11 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2)
input_dev->id.vendor = cinergyt2->udev->descriptor.idVendor;
input_dev->id.product = cinergyt2->udev->descriptor.idProduct;
input_dev->id.version = 1;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &cinergyt2->udev->dev;
+#else
+ input_dev->dev = &cinergyt2->udev->dev;
+#endif
err = input_register_device(input_dev);
if (err) {
diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c
index b100cb485..045d25541 100644
--- a/linux/drivers/media/dvb/ttpci/budget-ci.c
+++ b/linux/drivers/media/dvb/ttpci/budget-ci.c
@@ -29,8 +29,6 @@
* the project's page is at http://www.linuxtv.org/dvb/
*/
-#include "budget.h"
-
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/slab.h>
@@ -39,6 +37,8 @@
#include <linux/spinlock.h>
#include <media/ir-common.h>
+#include "budget.h"
+
#include "dvb_ca_en50221.h"
#include "stv0299.h"
#include "stv0297.h"
@@ -267,15 +267,11 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
input_dev->timer.function = msp430_ir_keyup;
input_dev->timer.data = (unsigned long) &budget_ci->ir;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
error = input_register_device(input_dev);
if (error) {
printk(KERN_ERR "budget_ci: could not init driver for IR device (code %d)\n", error);
goto out2;
}
-#else
- input_register_device(input_dev);
-#endif
tasklet_init(&budget_ci->ir.msp430_irq_tasklet, msp430_ir_interrupt,
(unsigned long) budget_ci);
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index b1598680d..74a710019 100644
--- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -20,11 +20,6 @@
*
*/
-#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
-#include <linux/mutex.h>
-#endif
-
#include <linux/list.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -38,6 +33,11 @@
#include <linux/init.h>
#include <linux/input.h>
+#include "compat.h"
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
+#include <linux/mutex.h>
+#endif
+
#include "dmxdev.h"
#include "dvb_demux.h"
#include "dvb_filter.h"
diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c
index 95566ff19..380766944 100644
--- a/linux/drivers/media/video/ir-kbd-i2c.c
+++ b/linux/drivers/media/video/ir-kbd-i2c.c
@@ -41,9 +41,9 @@
#include <linux/workqueue.h>
#include <asm/semaphore.h>
-#include "compat.h"
#include <media/ir-common.h>
#include <media/ir-kbd-i2c.h>
+#include "compat.h"
/* ----------------------------------------------------------------------- */
/* insmod parameters */
diff --git a/v4l/compat.h b/v4l/compat.h
index a4f66eee2..4b5f597fb 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -268,6 +268,10 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
# define input_allocate_device() kzalloc(sizeof(struct input_dev),GFP_KERNEL);
# define input_free_device(input_dev) kfree(input_dev)
+# ifdef _INPUT_H /* input.h must be included _before_ compat.h for this to work */
+ /* input_register_device() was changed to return an error code in 2.6.15 */
+# define input_register_device(x) (input_register_device(x), 0)
+# endif
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
@@ -288,6 +292,24 @@ schedule_timeout_interruptible(signed long timeout)
}
#endif
+/* New 4GB DMA zone was added in 2.6.15-rc2 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+# define __GFP_DMA32 __GFP_DMA
+#endif
+
+/* setup_timer() helper added 10/31/05, 2.6.15-rc1 */
+/* Need linux/timer.h to be included for struct timer_list */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) && defined(_LINUX_TIMER_H)
+static inline void setup_timer(struct timer_list * timer,
+ void (*function)(unsigned long),
+ unsigned long data)
+{
+ timer->function = function;
+ timer->data = data;
+ init_timer(timer);
+}
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#define IRQF_SHARED SA_SHIRQ
#define IRQF_DISABLED SA_INTERRUPT