diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-09 18:07:06 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-09 18:07:06 +0000 |
commit | 1c769dacd06c44528955753c2cac21b1d4b8ddef (patch) | |
tree | cbd22854f18480a8054382799ade8c765ab618d1 /v4l | |
parent | 15e9f7c5dda7607d5080c899de36fe6003e1318c (diff) | |
download | mediapointer-dvb-s2-1c769dacd06c44528955753c2cac21b1d4b8ddef.tar.gz mediapointer-dvb-s2-1c769dacd06c44528955753c2cac21b1d4b8ddef.tar.bz2 |
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
- Lots of small changes to allow compiling with kernel 2.4.
Compilation result not tested yet.
- After this patch, .version should be removed, since its
syntax has changed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/ChangeLog | 48 | ||||
-rw-r--r-- | v4l/Make.config | 1 | ||||
-rw-r--r-- | v4l/Makefile | 27 | ||||
-rw-r--r-- | v4l/compat.h | 39 |
4 files changed, 102 insertions, 13 deletions
diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 6559ebd45..c16eda94b 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,51 @@ +2005-10-09 18:02 mchehab + + * ../linux/drivers/media/video/bttv-cards.c: + * ../linux/drivers/media/video/bttv-driver.c: + * ../linux/drivers/media/video/bttv-i2c.c: + * ../linux/drivers/media/video/bttvp.h: + * ../linux/drivers/media/video/cx88/cx88-blackbird.c: + (blackbird_load_firmware): + * ../linux/drivers/media/video/cx88/cx88-core.c: + * ../linux/drivers/media/video/cx88/cx88-i2c.c: (cx88_i2c_init): + * ../linux/drivers/media/video/cx88/cx88-input.c: (cx88_ir_init): + * ../linux/drivers/media/video/cx88/cx88-tvaudio.c: + * ../linux/drivers/media/video/cx88/cx88-video.c: + * ../linux/drivers/media/video/cx88/cx88.h: + * ../linux/drivers/media/video/ir-kbd-gpio.c: + * ../linux/drivers/media/video/ir-kbd-i2c.c: + * ../linux/drivers/media/video/msp3400.c: (msp34xx_sleep), + (msp_probe), (msp_suspend): + * ../linux/drivers/media/video/saa6588.c: (saa6588_probe): + * ../linux/drivers/media/video/saa6752hs.c: (saa6752hs_probe): + * ../linux/drivers/media/video/saa7134/saa7134-alsa.c: + * ../linux/drivers/media/video/saa7134/saa7134-core.c: + (saa7134_fini): + * ../linux/drivers/media/video/saa7134/saa7134-empress.c: + * ../linux/drivers/media/video/saa7134/saa7134-i2c.c: + * ../linux/drivers/media/video/saa7134/saa7134.h: + * ../linux/drivers/media/video/tda9887.c: (tda9887_probe), + (tda9887_suspend): + * ../linux/drivers/media/video/tvaudio.c: (chip_thread), + (chip_probe): + * ../linux/drivers/media/video/tveeprom.c: + * ../linux/drivers/media/video/tvmixer.c: + * ../linux/drivers/media/video/tvp5150.c: + * ../linux/drivers/media/video/video-buf-dvb.c: + * ../linux/drivers/media/video/video-buf.c: + * ../linux/include/linux/video_decoder.h: + * ../linux/include/media/ir-common.h: + * ../v4l/Make.config: + * ../v4l/Makefile: + * ../v4l/compat.h: + - Lots of small changes to allow compiling with kernel 2.4. + Compilation result not tested yet. + + - After this patch, .version should be removed, since its + syntax has changed. + + Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> + 2005-10-09 08:46 mkrufky * ../v4l/scripts/merge-trees.sh: diff --git a/v4l/Make.config b/v4l/Make.config index 91cb1f7a1..bd8f1c145 100644 --- a/v4l/Make.config +++ b/v4l/Make.config @@ -26,6 +26,7 @@ CONFIG_DVB_FRONTENDS := n ifneq ($(KERNELRELEASE),) need_dvb = $(shell test $(SUBLEVEL) -ge 12 && echo yes) +need_dvb = $(shell test $(VERSION) -lt 6 && echo no) endif ifeq ($(need_dvb),yes) diff --git a/v4l/Makefile b/v4l/Makefile index f51050876..fcc0882e6 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -1,9 +1,7 @@ - ifeq ($(obj),) obj = . endif - ################################################# # configuration @@ -30,7 +28,6 @@ tuner-objs := tuner-core.o tuner-simple.o mt20xx.o tda8290.o tea5767.o list-multi := bttv.o saa7134.o cx88xx.o cx8800.o cx88-alsa.o cx8802.o em2820-objs := em2820-video.o em2820-i2c.o em2820-cards.o em2820-core.o - # what to build obj-m := video-buf.o v4l1-compat.o v4l2-common.o obj-$(CONFIG_VIDEO_BTTV) += btcx-risc.o ir-common.o bttv.o tveeprom.o @@ -87,8 +84,6 @@ endif # compile modules ifneq ($(KERNELRELEASE),) -# recursive call from kernel build system -dummy := $(shell echo $(KERNELRELEASE) > $(obj)/.version) ifeq ($(VERSION).$(PATCHLEVEL),2.6) export-objs := @@ -125,7 +120,7 @@ saa7134.o: $(saa7134-objs) -include $(TOPDIR)/Rules.make else # take version info from last module build if available -KERNELRELEASE := $(shell cat $(obj)/.version 2>/dev/null || uname -r) +-include $(obj)/.version endif KDIR := /lib/modules/$(KERNELRELEASE)/build @@ -134,7 +129,12 @@ DEST := /lib/modules/$(KERNELRELEASE)/$(MDIR) KDIR26 := /lib/modules/$(KERNELRELEASE)/kernel/drivers/media KDIRUSB := /lib/modules/$(KERNELRELEASE)/kernel/drivers/usb/media -CPPFLAGS := -I$(SUBDIRS)/../linux/include $(CPPFLAGS) +ifeq ($(VERSION).$(PATCHLEVEL),2.6) + CPPFLAGS := -I$(SUBDIRS)/../linux/include $(CPPFLAGS) + MYCFLAGS := +else + MYCFLAGS := CFLAGS="-I../linux/include -D__KERNEL__ -I$(KDIR)/include -DEXPORT_SYMTAB" +endif # which files to install? inst-m := $(wildcard *.ko) @@ -162,8 +162,8 @@ v4l_modules := $(shell lsmod|cut -d' ' -f1 ) $(patsubst %.ko,%,$(inst-m)) LC_ALL = POSIX export LC_ALL -default:: links - $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules +default:: links .version + $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules links:: find ../linux/drivers/media/video -name '*.[c,h]' -type f -exec ln -sf '{}' . \; @@ -263,6 +263,15 @@ linux media: -rm -f .version .*.o.flags .*.o.d .*.o.cmd .*.ko.cmd -rm -rf .tmp_versions +.version: +ifneq ($(KERNELRELEASE),) + echo -e VERSION=$(VERSION)\\nPATCHLEVEL:=$(PATCHLEVEL)\\nSUBLEVEL:=$(SUBLEVEL)\\nKERNELRELEASE:=$(KERNELRELEASE) > $(obj)/.version +else + echo "No version yet." + uname -r|perl -ne 'if (/^([0-9]*)\.([0-9])*\.([0-9]*)/) { printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s\n",$$1,$$2,$$3,$$1,$$2,$$3); };' > $(obj)/.version + +endif + ################################################# # build tarballs diff --git a/v4l/compat.h b/v4l/compat.h index 6e9f5091f..27153b9b0 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -1,5 +1,5 @@ /* - * $Id: compat.h,v 1.21 2005/10/06 14:38:52 mchehab Exp $ + * $Id: compat.h,v 1.22 2005/10/09 18:07:06 mchehab Exp $ */ #ifndef _COMPAT_H @@ -16,7 +16,10 @@ #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include <linux/delay.h> # define need_resched() (current->need_resched) + +#define work_struct tq_struct #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) @@ -53,6 +56,9 @@ # define PCI_D0 (0) # define assert_spin_locked(foobar) #endif +#if !defined(I2C_ALGO_SAA7134) +#define I2C_ALGO_SAA7134 I2C_HW_B_BT848 +#endif #if !defined(I2C_HW_B_CX2388x) # define I2C_HW_B_CX2388x I2C_HW_B_BT848 #endif @@ -67,11 +73,15 @@ #define I2C_HW_B_EM2820 I2C_HW_B_BT848 #endif +#ifndef I2C_M_IGNORE_NAK +# define I2C_M_IGNORE_NAK 0x1000 +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) #define __le32 __u32 #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7)) static inline unsigned long msecs_to_jiffies(const unsigned int m) { #if HZ <= 1000 && !(1000 % HZ) @@ -100,7 +110,6 @@ static inline void msleep(unsigned int msecs) timeout = schedule_timeout(timeout); } } -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) static inline unsigned long msleep_interruptible(unsigned int msecs) @@ -114,7 +123,7 @@ static inline unsigned long msleep_interruptible(unsigned int msecs) return jiffies_to_msecs(timeout); } #endif - +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) #define pm_message_t u32 #endif @@ -126,6 +135,28 @@ static inline unsigned long msleep_interruptible(unsigned int msecs) #endif #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#define KEY_NEXT 0x197 +#define KEY_RADIO 0x181 +#define KEY_PREVIOUS 0x19c +#define KEY_MHP 0x16f +#define KEY_EPG 0x16d +#define KEY_FASTFORWARD 208 +#define KEY_LIST 0x18b +#define KEY_LAST 0x195 +#define KEY_CLEAR 0x163 +#define KEY_AUX 0x186 +#define KEY_SCREEN 0x177 +#define KEY_MEDIA 226 +#define KEY_SLOW 0x199 +#define KEY_OK 0x160 +#define KEY_DIGITS 0x19d + +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) +#endif + #endif /* * Local variables: |