diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-07 16:29:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-07 16:29:39 -0500 |
commit | 89a30a8388c9592579f237bc06988808f2c454d4 (patch) | |
tree | 8273743377e8cde5f4f3beee7e9535d966b04abc | |
parent | 2b300d204738a70fa62c38583905a6989b3cedcd (diff) | |
parent | 89dab3573aa1d95fd222ee4551f964bfa4c16823 (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:
V4L/DVB (6916): ivtv: udelay has to be changed *after* the eeprom was read, not before
V4L/DVB (6944a): Fix Regression VIDIOCGMBUF ioctl hangs on bttv driver
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 4 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 4 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-i2c.c | 5 |
3 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index c02d92deacd2..581a3c955739 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -3063,11 +3063,10 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, | |||
3063 | struct video_mbuf *mbuf = arg; | 3063 | struct video_mbuf *mbuf = arg; |
3064 | unsigned int i; | 3064 | unsigned int i; |
3065 | 3065 | ||
3066 | mutex_lock(&fh->cap.lock); | ||
3067 | retval = videobuf_mmap_setup(&fh->cap,gbuffers,gbufsize, | 3066 | retval = videobuf_mmap_setup(&fh->cap,gbuffers,gbufsize, |
3068 | V4L2_MEMORY_MMAP); | 3067 | V4L2_MEMORY_MMAP); |
3069 | if (retval < 0) | 3068 | if (retval < 0) |
3070 | goto fh_unlock_and_return; | 3069 | return retval; |
3071 | 3070 | ||
3072 | gbuffers = retval; | 3071 | gbuffers = retval; |
3073 | memset(mbuf,0,sizeof(*mbuf)); | 3072 | memset(mbuf,0,sizeof(*mbuf)); |
@@ -3075,7 +3074,6 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, | |||
3075 | mbuf->size = gbuffers * gbufsize; | 3074 | mbuf->size = gbuffers * gbufsize; |
3076 | for (i = 0; i < gbuffers; i++) | 3075 | for (i = 0; i < gbuffers; i++) |
3077 | mbuf->offsets[i] = i * gbufsize; | 3076 | mbuf->offsets[i] = i * gbufsize; |
3078 | mutex_unlock(&fh->cap.lock); | ||
3079 | return 0; | 3077 | return 0; |
3080 | } | 3078 | } |
3081 | case VIDIOCMCAPTURE: | 3079 | case VIDIOCMCAPTURE: |
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 6d2dd8764f81..10d6faf8ccda 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -1076,6 +1076,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev, | |||
1076 | ivtv_process_eeprom(itv); | 1076 | ivtv_process_eeprom(itv); |
1077 | } | 1077 | } |
1078 | 1078 | ||
1079 | /* The mspx4xx chips need a longer delay for some reason */ | ||
1080 | if (!(itv->hw_flags & IVTV_HW_MSP34XX)) | ||
1081 | itv->i2c_algo.udelay = 5; | ||
1082 | |||
1079 | if (itv->std == 0) { | 1083 | if (itv->std == 0) { |
1080 | itv->std = V4L2_STD_NTSC_M; | 1084 | itv->std = V4L2_STD_NTSC_M; |
1081 | } | 1085 | } |
diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 44678fe27a04..36e54f78aa2a 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c | |||
@@ -541,7 +541,7 @@ static const struct i2c_algo_bit_data ivtv_i2c_algo_template = { | |||
541 | .setscl = ivtv_setscl_old, | 541 | .setscl = ivtv_setscl_old, |
542 | .getsda = ivtv_getsda_old, | 542 | .getsda = ivtv_getsda_old, |
543 | .getscl = ivtv_getscl_old, | 543 | .getscl = ivtv_getscl_old, |
544 | .udelay = 5, | 544 | .udelay = 10, |
545 | .timeout = 200, | 545 | .timeout = 200, |
546 | }; | 546 | }; |
547 | 547 | ||
@@ -718,9 +718,6 @@ int init_ivtv_i2c(struct ivtv *itv) | |||
718 | sizeof(struct i2c_adapter)); | 718 | sizeof(struct i2c_adapter)); |
719 | memcpy(&itv->i2c_algo, &ivtv_i2c_algo_template, | 719 | memcpy(&itv->i2c_algo, &ivtv_i2c_algo_template, |
720 | sizeof(struct i2c_algo_bit_data)); | 720 | sizeof(struct i2c_algo_bit_data)); |
721 | /* The mspx4xx chips need a longer delay for some reason */ | ||
722 | if (itv->hw_flags & IVTV_HW_MSP34XX) | ||
723 | itv->i2c_algo.udelay = 10; | ||
724 | itv->i2c_algo.data = itv; | 721 | itv->i2c_algo.data = itv; |
725 | itv->i2c_adap.algo_data = &itv->i2c_algo; | 722 | itv->i2c_adap.algo_data = &itv->i2c_algo; |
726 | } | 723 | } |