diff options
author | Michael Hunold <devnull@localhost> | 2003-03-20 09:56:57 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2003-03-20 09:56:57 +0000 |
commit | dab9ea33014f096f57a109767f77a48c544bcbb4 (patch) | |
tree | e91686163e24c2de98c5f084487436e33ee408f7 /linux/drivers/media/dvb/dvb-core/compat.c | |
parent | 5797f42d3ed47493db6ec2b904a9e8df10969f90 (diff) | |
download | mediapointer-dvb-s2-dab9ea33014f096f57a109767f77a48c544bcbb4.tar.gz mediapointer-dvb-s2-dab9ea33014f096f57a109767f77a48c544bcbb4.tar.bz2 |
Small changes all over the place:
- sync Kconfig and Makefiles with 2.5.65
- fix various things in saa7146 because of latest v4l changes in 2.5.65
- makelinks: removed the compat module from the 2.5.x build process
- makelinks: removed the linkage of ttusb and bt8xx -- enable this again for
the next patches, when ttusb is more stable and the bt8xx related patches
have been applied by Gerd Knorr
- dvb: removed the compat module from the 2.5.x build process, added #ifdefs
around the inclusion of compat.h. this was necessary because having compat
code in the newest 2.5.x kernel is awkward.
- dvb: move around of dvb_usercopy again. because I removed the compat module
from the 2.5.x build process, dvb_usercopy had to be moved to another file
- dvb: change MOD_*_USE_COUNT to module_get/module_put in various files,
but I'm not sure if I did this right. please review these changes.
- dvb: removed the crc32 code from dvb_demux.c, because it's in compat.c, too.
- dvb: removed some cruft from dvd_i2c.c, which is present in compat.h
- all files: apply small fixes to reflect the new location of some header
files
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core/compat.c')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/compat.c | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/compat.c b/linux/drivers/media/dvb/dvb-core/compat.c index d66012ee4..85e9d9949 100644 --- a/linux/drivers/media/dvb/dvb-core/compat.c +++ b/linux/drivers/media/dvb/dvb-core/compat.c @@ -8,65 +8,6 @@ * even when everything compiles. */ -int dvb_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(dvb_usercopy); - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) static u32 crc32_table[256] = { |