diff options
author | Michael Hunold <devnull@localhost> | 2002-12-17 15:05:45 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2002-12-17 15:05:45 +0000 |
commit | 323dee0dd2b07f636e703605664b2f92d93c403b (patch) | |
tree | d10e80338456cfaf8f4c5d56dfee5abd37190c13 | |
parent | 54edc80d17bdac1b10665581c645ba6bac3f54f9 (diff) | |
download | mediapointer-dvb-s2-323dee0dd2b07f636e703605664b2f92d93c403b.tar.gz mediapointer-dvb-s2-323dee0dd2b07f636e703605664b2f92d93c403b.tar.bz2 |
Remove most of the compatiblilty crap from "compat.h", the new
saa7146 does not need the stuff any more. Propagate these changes
to some of the files.
Remove unnecessary stuff from the Makefile,
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/Makefile | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/compat.c | 86 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/compat.h | 32 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_demux.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.c | 2 |
5 files changed, 3 insertions, 121 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/Makefile b/linux/drivers/media/dvb/dvb-core/Makefile index a32a5f553..8bc7b7116 100644 --- a/linux/drivers/media/dvb/dvb-core/Makefile +++ b/linux/drivers/media/dvb/dvb-core/Makefile @@ -8,6 +8,3 @@ dvb-core-objs = dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \ dvb_frontend.o dvb_i2c.o dvb_net.o dvb_ksyms.o obj-$(CONFIG_DVB_CORE) += dvb-core.o - -include $(TOPDIR)/Rules.make - diff --git a/linux/drivers/media/dvb/dvb-core/compat.c b/linux/drivers/media/dvb/dvb-core/compat.c index 4c658f33d..925fbdefb 100644 --- a/linux/drivers/media/dvb/dvb-core/compat.c +++ b/linux/drivers/media/dvb/dvb-core/compat.c @@ -8,92 +8,6 @@ * even when everything compiles. */ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) || !CONFIG_VIDEO_DEV -int generic_usercopy(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg, - int (*func)(struct inode *inode, struct file *file, - unsigned int cmd, void *arg)) -{ - char sbuf[128]; - void *mbuf = NULL; - void *parg = NULL; - int err = -EINVAL; - - /* Copy arguments into temp kernel buffer */ - switch (_IOC_DIR(cmd)) { - case _IOC_NONE: - parg = (void *)arg; - break; - case _IOC_READ: /* some v4l ioctls are marked wrong ... */ - case _IOC_WRITE: - case (_IOC_WRITE | _IOC_READ): - if (_IOC_SIZE(cmd) <= sizeof(sbuf)) { - parg = sbuf; - } else { - /* too big to allocate from stack */ - mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL); - if (NULL == mbuf) - return -ENOMEM; - parg = mbuf; - } - - err = -EFAULT; - if (copy_from_user(parg, (void *)arg, _IOC_SIZE(cmd))) - goto out; - break; - } - - /* call driver */ - if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD) - err = -EINVAL; - - if (err < 0) - goto out; - - /* Copy results into user buffer */ - switch (_IOC_DIR(cmd)) - { - case _IOC_READ: - case (_IOC_WRITE | _IOC_READ): - if (copy_to_user((void *)arg, parg, _IOC_SIZE(cmd))) - err = -EFAULT; - break; - } - -out: - if (mbuf) - kfree(mbuf); - - return err; -} -EXPORT_SYMBOL(generic_usercopy); -#endif - - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -struct page * vmalloc_to_page(void *vmalloc_addr) -{ - unsigned long addr = (unsigned long) vmalloc_addr; - struct page *page = NULL; - pgd_t *pgd = pgd_offset_k(addr); - pmd_t *pmd; - pte_t *ptep, pte; - - if (!pgd_none(*pgd)) { - pmd = pmd_offset(pgd, addr); - if (!pmd_none(*pmd)) { - ptep = pte_offset(pmd, addr); - pte = *ptep; - if (pte_present(pte)) - page = pte_page(pte); - } - } - return page; -} -EXPORT_SYMBOL(vmalloc_to_page); -#endif - - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) static u32 crc32_table[256] = { diff --git a/linux/drivers/media/dvb/dvb-core/compat.h b/linux/drivers/media/dvb/dvb-core/compat.h index 89979bade..5e6820650 100644 --- a/linux/drivers/media/dvb/dvb-core/compat.h +++ b/linux/drivers/media/dvb/dvb-core/compat.h @@ -16,14 +16,12 @@ #define MODULE_LICENSE(x) #endif - #ifndef list_for_each_safe #define list_for_each_safe(pos, n, head) \ for (pos = (head)->next, n = pos->next; pos != (head); \ pos = n, n = pos->next) #endif - #ifndef __devexit_p #if defined(MODULE) #define __devexit_p(x) x @@ -32,22 +30,10 @@ #endif #endif - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) || !CONFIG_VIDEO_DEV -#define video_usercopy generic_usercopy - -extern int generic_usercopy(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg, - int (*func)(struct inode *inode, struct file *file, - unsigned int cmd, void *arg)); -#endif - - #ifndef minor #define minor(dev) MINOR(dev) #endif - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)) static inline void cond_resched (void) @@ -58,24 +44,6 @@ void cond_resched (void) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - -#define video_devdata(dev) (dev->priv) - -extern struct page * vmalloc_to_page(void *addr); - -#if defined(MODVERSIONS) -#include <linux/modversions.h> -#undef remap_page_range -#define remap_page_range(vma,from,to,size,prot) \ - _set_ver(remap_page_range)(from,to,size,prot) -#else -#define remap_page_range(vma,from,to,size,prot) \ - remap_page_range(from,to,size,prot) -#endif -#endif - - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) extern u32 crc32_le (u32 crc, unsigned char const *p, size_t len); #else diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.c b/linux/drivers/media/dvb/dvb-core/dvb_demux.c index 41afff5b0..73f8be699 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.c @@ -26,6 +26,7 @@ #include <linux/poll.h> #include <linux/version.h> #include <asm/uaccess.h> +#include <linux/crc32.h> #include "compat.h" #include "dvb_demux.h" diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c index 7b0d5bb89..493ae0203 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -437,7 +437,9 @@ int dvb_frontend_thread (void *data) lock_kernel (); daemonize (); +/* not needed anymore in 2.5.x, done in daemonize() reparent_to_init (); +*/ sigfillset (¤t->blocked); fe->thread = current; snprintf (current->comm, sizeof (current->comm), "kdvb-fe-%i:%i", |