diff options
author | Gerd Knorr <devnull@localhost> | 2004-07-30 13:43:39 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-07-30 13:43:39 +0000 |
commit | 4df008f985ce28551d586721818b7a7a00b8b1dd (patch) | |
tree | a435231150c5e27b174891ffb6e0f8ddf17a40cc /v4l | |
parent | 016aa2e20f1ca4b4f5430c4e945878b73a866894 (diff) | |
download | mediapointer-dvb-s2-4df008f985ce28551d586721818b7a7a00b8b1dd.tar.gz mediapointer-dvb-s2-4df008f985ce28551d586721818b7a7a00b8b1dd.tar.bz2 |
- cx88: more reorganization + code shuffeling.
Diffstat (limited to 'v4l')
-rw-r--r-- | v4l/Makefile | 3 | ||||
-rw-r--r-- | v4l/compat.h | 43 |
2 files changed, 45 insertions, 1 deletions
diff --git a/v4l/Makefile b/v4l/Makefile index 1f76b5e4e..726bf6b29 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -30,7 +30,8 @@ list-multi := bttv.o saa7134.o cx88xx.o cx8800.o cx8801.o cx8802.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 -obj-$(CONFIG_VIDEO_CX88) += btcx-risc.o cx88xx.o cx8800.o cx8801.o cx8802.o +obj-$(CONFIG_VIDEO_CX88) += btcx-risc.o cx88xx.o cx8800.o cx8801.o cx8802.o \ + cx88-blackbird.o cx88-dvb.o obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa6752hs.o obj-$(CONFIG_VIDEO_IR) += ir-common.o obj-$(CONFIG_VIDEO_TUNER) += tuner.o tda9887.o diff --git a/v4l/compat.h b/v4l/compat.h new file mode 100644 index 000000000..0807b44c1 --- /dev/null +++ b/v4l/compat.h @@ -0,0 +1,43 @@ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23) +# define irqreturn_t void +# define IRQ_RETVAL(foobar) +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71) +# define strlcpy(dest,src,len) strncpy(dest,src,(len)-1) +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) +# define iminor(inode) minor(inode->i_rdev) +#endif + +#if defined(I2C_ADAP_CLASS_TV_ANALOG) && !defined(I2C_CLASS_TV_ANALOG) +# define I2C_CLASS_TV_ANALOG I2C_ADAP_CLASS_TV_ANALOG +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7) +static inline unsigned long msecs_to_jiffies(const unsigned int m) +{ +#if HZ <= 1000 && !(1000 % HZ) + return (m + (1000 / HZ) - 1) / (1000 / HZ); +#elif HZ > 1000 && !(HZ % 1000) + return m * (HZ / 1000); +#else + return (m * HZ + 999) / 1000; +#endif +} +static inline void msleep(unsigned int msecs) +{ + unsigned long timeout = msecs_to_jiffies(msecs); + while (timeout) { + set_current_state(TASK_UNINTERRUPTIBLE); + timeout = schedule_timeout(timeout); + } +} +#endif + +/* + * Local variables: + * c-basic-offset: 8 + * End: + */ |