diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-12-11 18:11:56 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-12-11 18:11:56 +0000 |
commit | c652e86c520a930ce138a26e8b3a1008c12831d4 (patch) | |
tree | 95c479d6868dff609f714883a3f36168a3e6a9d9 | |
parent | 2ac4714c81661373de42c676440c324fac6752fb (diff) | |
download | mediapointer-dvb-s2-c652e86c520a930ce138a26e8b3a1008c12831d4.tar.gz mediapointer-dvb-s2-c652e86c520a930ce138a26e8b3a1008c12831d4.tar.bz2 |
Makes v4l compile under 2.4 kernels
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
kernel-sync
- Makes V4L compile with kernel 2.4
- em28xx doesn't compile with 2.4 kernels. Additional work is
necessary to make it compile.
Thanks-to: Stefan Leichter <Stefan.Leichter@camLine.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r-- | linux/drivers/media/video/cs53l32a.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-audio.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-core.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-mpeg.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/mt20xx.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/saa711x.c | 7 | ||||
-rw-r--r-- | linux/drivers/media/video/tda8290.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/tea5767.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/wm8775.c | 1 | ||||
-rw-r--r-- | v4l/ChangeLog | 22 | ||||
-rw-r--r-- | v4l/Make.config | 4 | ||||
-rw-r--r-- | v4l/Makefile | 25 | ||||
-rw-r--r-- | v4l/compat.h | 4 |
14 files changed, 90 insertions, 9 deletions
diff --git a/linux/drivers/media/video/cs53l32a.c b/linux/drivers/media/video/cs53l32a.c index 2d3ee491e..1e5cf79d6 100644 --- a/linux/drivers/media/video/cs53l32a.c +++ b/linux/drivers/media/video/cs53l32a.c @@ -31,6 +31,7 @@ #include <media/audiochip.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #include <media/i2c-compat.h> +#include <linux/slab.h> #endif MODULE_DESCRIPTION("i2c device driver for cs53l32a Audio ADC"); diff --git a/linux/drivers/media/video/cx25840/cx25840-audio.c b/linux/drivers/media/video/cx25840/cx25840-audio.c index 448305874..51b00e593 100644 --- a/linux/drivers/media/video/cx25840/cx25840-audio.c +++ b/linux/drivers/media/video/cx25840/cx25840-audio.c @@ -21,6 +21,9 @@ #include <linux/i2c.h> #include <media/audiochip.h> #include <media/v4l2-common.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include <media/i2c-compat.h> +#endif #include "cx25840.h" diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index 517a702bd..cfa9cca9f 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -34,6 +34,9 @@ #include <linux/i2c.h> #include <media/audiochip.h> #include <media/v4l2-common.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include <media/i2c-compat.h> +#endif #include "cx25840.h" diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index 72b004f96..a40d1bcd0 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-mpeg.c,v 1.41 2005/11/13 18:11:21 mkrufky Exp $ + * $Id: cx88-mpeg.c,v 1.42 2005/12/11 18:11:56 mchehab Exp $ * * Support for the mpeg transport stream transfers * PCI function #2 of the cx2388x. @@ -26,19 +26,25 @@ #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/init.h> +#include "compat.h" +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) #include <linux/device.h> +#endif #include <linux/interrupt.h> #include <asm/delay.h> -#include "compat.h" #include "cx88.h" /* ------------------------------------------------------------------ */ MODULE_DESCRIPTION("mpeg driver for cx2388x based TV cards"); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) MODULE_AUTHOR("Jelle Foks <jelle@foks.8m.com>"); MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); +#else +MODULE_AUTHOR("Jelle Foks <jelle@foks.8m.com>,Chris Pascoe <c.pascoe@itee.uq.edu.au>,Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); +#endif MODULE_LICENSE("GPL"); static unsigned int debug = 0; diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index bdfa47898..3194f64c0 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -33,6 +33,10 @@ #include "em28xx.h" #include <media/tuner.h> #include <media/v4l2-common.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include <media/i2c-compat.h> +#include <linux/moduleparam.h> +#endif #define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \ "Markus Rechberger <mrechberger@gmail.com>, " \ diff --git a/linux/drivers/media/video/mt20xx.c b/linux/drivers/media/video/mt20xx.c index 533baaaa6..956af1dd4 100644 --- a/linux/drivers/media/video/mt20xx.c +++ b/linux/drivers/media/video/mt20xx.c @@ -1,5 +1,5 @@ /* - * $Id: mt20xx.c,v 1.10 2005/12/04 12:21:15 hverkuil Exp $ + * $Id: mt20xx.c,v 1.11 2005/12/11 18:11:56 mchehab Exp $ * * i2c tv tuner chip device driver * controls microtune tuners, mt2032 + mt2050 at the moment. @@ -10,6 +10,9 @@ #include <linux/videodev.h> #include <linux/moduleparam.h> #include <media/tuner.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include <media/i2c-compat.h> +#endif /* ---------------------------------------------------------------------- */ diff --git a/linux/drivers/media/video/saa711x.c b/linux/drivers/media/video/saa711x.c index 0ba7c6fd9..ca27ae3d8 100644 --- a/linux/drivers/media/video/saa711x.c +++ b/linux/drivers/media/video/saa711x.c @@ -478,10 +478,17 @@ static int saa711x_i2c_id = 0; static struct i2c_driver i2c_driver_saa711x; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static int saa711x_detect_client (struct i2c_adapter *adapter, int address, int kind) +#else +static int +saa711x_detect_client (struct i2c_adapter *adapter, + int address, + unsigned short flags, int kind) +#endif { int i; struct i2c_client *client; diff --git a/linux/drivers/media/video/tda8290.c b/linux/drivers/media/video/tda8290.c index 80538b4d2..5f138d934 100644 --- a/linux/drivers/media/video/tda8290.c +++ b/linux/drivers/media/video/tda8290.c @@ -1,5 +1,5 @@ /* - $Id: tda8290.c,v 1.30 2005/11/16 20:00:59 mchehab Exp $ + $Id: tda8290.c,v 1.31 2005/12/11 18:11:56 mchehab Exp $ i2c tv tuner chip device driver controls the philips tda8290+75 tuner chip combo. @@ -24,6 +24,9 @@ #include <linux/videodev.h> #include <linux/delay.h> #include <media/tuner.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include <media/i2c-compat.h> +#endif /* ---------------------------------------------------------------------- */ diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c index 759b68d8c..c9a66b6df 100644 --- a/linux/drivers/media/video/tea5767.c +++ b/linux/drivers/media/video/tea5767.c @@ -2,7 +2,7 @@ * For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview * I2C address is allways 0xC0. * - * $Id: tea5767.c,v 1.30 2005/10/16 12:13:58 mchehab Exp $ + * $Id: tea5767.c,v 1.31 2005/12/11 18:11:56 mchehab Exp $ * * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br) * This code is placed under the terms of the GNU General Public License @@ -16,6 +16,9 @@ #include <linux/videodev.h> #include <linux/delay.h> #include <media/tuner.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include <media/i2c-compat.h> +#endif #define PREFIX "TEA5767 " diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c index 6a2c41567..527ea7d0f 100644 --- a/linux/drivers/media/video/wm8775.c +++ b/linux/drivers/media/video/wm8775.c @@ -36,6 +36,7 @@ #include <media/audiochip.h> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #include <media/i2c-compat.h> +#include <linux/slab.h> #endif MODULE_DESCRIPTION("wm8775 driver"); diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 0de293375..3b458703e 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,25 @@ +2005-12-11 18:06 mchehab + + * linux/drivers/media/video/cs53l32a.c: + * linux/drivers/media/video/cx25840/cx25840-audio.c: + * linux/drivers/media/video/cx25840/cx25840-core.c: + * linux/drivers/media/video/cx88/cx88-mpeg.c: + * linux/drivers/media/video/em28xx/em28xx-video.c: + * linux/drivers/media/video/mt20xx.c: + * linux/drivers/media/video/saa711x.c: (saa711x_detect_client): + * linux/drivers/media/video/tda8290.c: + * linux/drivers/media/video/tea5767.c: + * linux/drivers/media/video/wm8775.c: + * v4l/Make.config: + * v4l/Makefile: + * v4l/compat.h: + - Makes V4L compile with kernel 2.4 + - em28xx doesn't compile with 2.4 kernels. Additional work is + necessary to make it compile. + + Thanks-to: Stefan Leichter <Stefan.Leichter@camLine.com> + Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> + 2005-12-11 17:43 mchehab * linux/drivers/media/video/bttv-input.c: (bttv_input_init): diff --git a/v4l/Make.config b/v4l/Make.config index 32dfa69b1..e537d5e6f 100644 --- a/v4l/Make.config +++ b/v4l/Make.config @@ -1,6 +1,7 @@ MDIR := v4l2 snap := video4linux +CONFIG_VIDEO_DEV := m CONFIG_VIDEO_BTTV := m CONFIG_VIDEO_SAA7134 := m CONFIG_VIDEO_IR := m @@ -10,7 +11,6 @@ CONFIG_VIDEO_CX88 := m CONFIG_TVP5150 := m CONFIG_SAA711X := m -CONFIG_EM28XX := m CONFIG_VIDEO_DECODER := m @@ -56,6 +56,8 @@ CONFIG_VIDEO_SAA7146_VV := n ifneq ($(KERNELRELEASE),) CONFIG_VIDEO_BUF_DVB := $(shell test $(SUBLEVEL) -ge 12 -a $(PATCHLEVEL) -ge 6 && echo m) + CONFIG_VIDEO_DEV := $(shell test $(SUBLEVEL) -lt 6 && echo n) + CONFIG_EM28XX := $(shell test $(PATCHLEVEL) -ge 6 && echo m) endif ifeq ($(CONFIG_VIDEO_BUF_DVB),m) diff --git a/v4l/Makefile b/v4l/Makefile index 2461af80e..c55d7b7c6 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -9,7 +9,10 @@ include $(obj)/Make.config # symbol exports export-objs := video-buf.o v4l1-compat.o v4l2-common.o -export-objs += ir-common.o videodev.o +export-objs += ir-common.o +ifeq ($(CONFIG_VIDEO_DEV),m) +export-objs += videodev.o +endif export-objs += bttv-if.o btcx-risc.o export-objs += cx88-cards.o cx88-core.o export-objs += saa7134-core.o saa7134-tvaudio.o @@ -203,18 +206,33 @@ SNAPSHOT_CFLAGS := -DSNAPSHOT='$(shell cat $(snapshot))' EXTRA_CFLAGS += $(SNAPSHOT_CFLAGS) endif +# +# Need to compile with kernel 2.4 +# bttv.o: $(bttv-objs) $(LD) -r -o $@ $(bttv-objs) +cx25840.o: $(cx25840-objs) + $(LD) -g -r -o $@ $(cx25840-objs) + cx8800.o: $(cx8800-objs) $(LD) -g -r -o $@ $(cx8800-objs) +cx8802.o: $(cx8802-objs) + $(LD) -g -r -o $@ $(cx8802-objs) + cx88xx.o: $(cx88xx-objs) $(LD) -g -r -o $@ $(cx88xx-objs) +em28xx.o: $(em28xx-objs) + $(LD) -g -r -o $@ $(em28xx-objs) + saa7134.o: $(saa7134-objs) $(LD) -g -r -o $@ $(saa7134-objs) +tuner.o: $(tuner-objs) + $(LD) -g -r -o $@ $(tuner-objs) + -include $(TOPDIR)/Rules.make else # take version info from last module build if available @@ -243,7 +261,10 @@ endif inst_common := ir-common.ko inst_video := btcx-risc.ko bttv.ko tda9887.ko tuner.ko tvaudio.ko tveeprom.ko saa6588.ko inst_video += tvmixer.ko v4l1-compat.ko v4l2-common.ko wm8775.ko cs53l32a.ko -inst_video += video-buf.ko video-buf-dvb.ko videodev.ko +inst_video += video-buf.ko video-buf-dvb.ko +ifeq ($(CONFIG_VIDEO_DEV),m) +inst_video += videodev.ko +endif inst_video += ir-kbd-i2c.ko msp3400.ko inst_video += tvp5150.ko saa711x.ko saa7134-alsa.ko saa7134-oss.ko inst_video += saa7115.ko cx25840.ko saa7127.ko compat_ioctl32.ko diff --git a/v4l/compat.h b/v4l/compat.h index 67fc48824..a35acc464 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -1,5 +1,5 @@ /* - * $Id: compat.h,v 1.42 2005/12/10 01:43:26 mchehab Exp $ + * $Id: compat.h,v 1.43 2005/12/11 18:11:56 mchehab Exp $ */ #ifndef _COMPAT_H @@ -148,6 +148,7 @@ static inline unsigned long msleep_interruptible(unsigned int msecs) /* some keys from 2.6.x which are not (yet?) in 2.4.x */ # define KEY_PLAY 207 # define KEY_PRINT 210 +# define KEY_EMAIL 215 # define KEY_SEARCH 217 # define KEY_SELECT 0x161 # define KEY_GOTO 0x162 @@ -183,6 +184,7 @@ static inline unsigned long msleep_interruptible(unsigned int msecs) # define KEY_CLEAR 0x163 # define KEY_AUX 0x186 # define KEY_SCREEN 0x177 +# define KEY_PC 0x178 # define KEY_MEDIA 226 # define KEY_SLOW 0x199 # define KEY_OK 0x160 |