diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-07-12 11:34:38 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-07-12 11:34:38 +0200 |
commit | 5d9abf072da54a382d318a6a23bc4d65d1c9f6a7 (patch) | |
tree | 0091520c14854a60961fc21d8942a1cf32ffa56b /linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | |
parent | 0b44aa87bd1a08f0c6c64872413937415f5cc7e9 (diff) | |
parent | 5d6597046c8d57aa650a06343c4d63ba7dbe57dc (diff) | |
download | mediapointer-dvb-s2-5d9abf072da54a382d318a6a23bc4d65d1c9f6a7.tar.gz mediapointer-dvb-s2-5d9abf072da54a382d318a6a23bc4d65d1c9f6a7.tar.bz2 |
merge: from v4l-dvb
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c')
-rw-r--r-- | linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index 8786d3d6f..133648277 100644 --- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c @@ -12,6 +12,7 @@ #include <linux/init.h> #include <linux/slab.h> #include <linux/wait.h> +#include <linux/fs.h> #include <linux/module.h> #include <linux/usb.h> #include <linux/delay.h> @@ -988,22 +989,9 @@ static int stc_open(struct inode *inode, struct file *file) } static ssize_t stc_read(struct file *file, char *buf, size_t count, - loff_t * offset) + loff_t *offset) { - int tc = count; - - if ((tc + *offset) > 8192) - tc = 8192 - *offset; - - if (tc < 0) - return 0; - - if (copy_to_user(buf, stc_firmware + *offset, tc)) - return -EFAULT; - - *offset += tc; - - return tc; + return simple_read_from_buffer(buf, count, offset, stc_firmware, 8192); } static int stc_release(struct inode *inode, struct file *file) |