diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:14:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:14:42 -0400 |
commit | f894d18380e7e7ff05f6622ccb75d2881922c6e9 (patch) | |
tree | e3c11b831b68096239a49dec539a49e49c1d90b7 /drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | |
parent | d13ff0559fea73f237a01669887d2c10e11d7662 (diff) | |
parent | d20b27478d6ccf7c4c8de4f09db2bdbaec82a6c0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (277 commits)
V4L/DVB (8415): gspca: Infinite loop in i2c_w() of etoms.
V4L/DVB (8414): videodev/cx18: fix get_index bug and error-handling lock-ups
V4L/DVB (8411): videobuf-dma-contig.c: fix 64-bit build for pre-2.6.24 kernels
V4L/DVB (8410): sh_mobile_ceu_camera: fix 64-bit compiler warnings
V4L/DVB (8397): video: convert select VIDEO_ZORAN_ZR36060 into depends on
V4L/DVB (8396): video: Fix Kbuild dependency for VIDEO_IR_I2C
V4L/DVB (8395): saa7134: Fix Kbuild dependency of ir-kbd-i2c
V4L/DVB (8394): ir-common: CodingStyle fix: move EXPORT_SYMBOL_GPL to their proper places
V4L/DVB (8393): media/video: Fix depencencies for VIDEOBUF
V4L/DVB (8392): media/Kconfig: Convert V4L1_COMPAT select into "depends on"
V4L/DVB (8390): videodev: add comment and remove magic number.
V4L/DVB (8389): videodev: simplify get_index()
V4L/DVB (8387): Some cosmetic changes
V4L/DVB (8381): ov7670: fix compile warnings
V4L/DVB (8380): saa7115: use saa7115_auto instead of saa711x as the autodetect driver name.
V4L/DVB (8379): saa7127: Make device detection optional
V4L/DVB (8378): cx18: move cx18_av_vbi_setup to av-core.c and rename to cx18_av_std_setup
V4L/DVB (8377): ivtv/cx18: ensure the default control values are correct
V4L/DVB (8376): cx25840: move cx25840_vbi_setup to core.c and rename to cx25840_std_setup
V4L/DVB (8374): gspca: No conflict of 0c45:6011 with the sn9c102 driver.
...
Diffstat (limited to 'drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c')
-rw-r--r-- | drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index bc2043e44ebd..e6c9cd2e3b94 100644 --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
15 | #include <linux/fs.h> | ||
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/usb.h> | 17 | #include <linux/usb.h> |
17 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
@@ -990,22 +991,9 @@ static int stc_open(struct inode *inode, struct file *file) | |||
990 | } | 991 | } |
991 | 992 | ||
992 | static ssize_t stc_read(struct file *file, char *buf, size_t count, | 993 | static ssize_t stc_read(struct file *file, char *buf, size_t count, |
993 | loff_t * offset) | 994 | loff_t *offset) |
994 | { | 995 | { |
995 | int tc = count; | 996 | return simple_read_from_buffer(buf, count, offset, stc_firmware, 8192); |
996 | |||
997 | if ((tc + *offset) > 8192) | ||
998 | tc = 8192 - *offset; | ||
999 | |||
1000 | if (tc < 0) | ||
1001 | return 0; | ||
1002 | |||
1003 | if (copy_to_user(buf, stc_firmware + *offset, tc)) | ||
1004 | return -EFAULT; | ||
1005 | |||
1006 | *offset += tc; | ||
1007 | |||
1008 | return tc; | ||
1009 | } | 997 | } |
1010 | 998 | ||
1011 | static int stc_release(struct inode *inode, struct file *file) | 999 | static int stc_release(struct inode *inode, struct file *file) |
@@ -1693,11 +1681,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
1693 | 1681 | ||
1694 | i2c_set_adapdata(&ttusb->i2c_adap, ttusb); | 1682 | i2c_set_adapdata(&ttusb->i2c_adap, ttusb); |
1695 | 1683 | ||
1696 | #ifdef I2C_ADAP_CLASS_TV_DIGITAL | ||
1697 | ttusb->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL; | ||
1698 | #else | ||
1699 | ttusb->i2c_adap.class = I2C_CLASS_TV_DIGITAL; | 1684 | ttusb->i2c_adap.class = I2C_CLASS_TV_DIGITAL; |
1700 | #endif | ||
1701 | ttusb->i2c_adap.algo = &ttusb_dec_algo; | 1685 | ttusb->i2c_adap.algo = &ttusb_dec_algo; |
1702 | ttusb->i2c_adap.algo_data = NULL; | 1686 | ttusb->i2c_adap.algo_data = NULL; |
1703 | ttusb->i2c_adap.dev.parent = &udev->dev; | 1687 | ttusb->i2c_adap.dev.parent = &udev->dev; |