diff options
author | Thierry MERLE <thierry.merle@free.fr> | 2006-12-15 16:46:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-27 14:19:04 -0200 |
commit | 38284ba361d69eca34a3bfc553ebfac81fea2698 (patch) | |
tree | ab923c9b82ac8f3be51006ccbd425182f3c07f42 /drivers/media/video/usbvision/usbvision-video.c | |
parent | 3a4456a073150c8b0d790daa007d2aab9ebdecb5 (diff) |
V4L/DVB (4970): Usbvision memory fixes
- fix decompression buffer allocation not done at first driver open
- simplification of USB sbuf allocation (use of usb_buffer_alloc)
- replaced vmalloc by vmalloc_32 (for homogeneity)
- add of saa7111 (i2cAddr=0x48) detection printout in attach_inform
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/usbvision/usbvision-video.c')
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index b77e25ea883..31b133ef069 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c @@ -353,20 +353,15 @@ static int usbvision_v4l2_open(struct inode *inode, struct file *file) if(!errCode) { /* Allocate memory for the scratch ring buffer */ errCode = usbvision_scratch_alloc(usbvision); - if(!errCode) { - /* Allocate memory for the USB S buffers */ - errCode = usbvision_sbuf_alloc(usbvision); - if ((!errCode) && (usbvision->isocMode==ISOC_MODE_COMPRESS)) { - /* Allocate intermediate decompression buffers only if needed */ - errCode = usbvision_decompress_alloc(usbvision); - } + if ((!errCode) && (isocMode==ISOC_MODE_COMPRESS)) { + /* Allocate intermediate decompression buffers only if needed */ + errCode = usbvision_decompress_alloc(usbvision); } } if (errCode) { /* Deallocate all buffers if trouble */ usbvision_frames_free(usbvision); usbvision_scratch_free(usbvision); - usbvision_sbuf_free(usbvision); usbvision_decompress_free(usbvision); } } @@ -437,9 +432,8 @@ static int usbvision_v4l2_close(struct inode *inode, struct file *file) usbvision_stop_isoc(usbvision); usbvision_decompress_free(usbvision); - usbvision_rvfree(usbvision->fbuf, usbvision->fbuf_size); + usbvision_frames_free(usbvision); usbvision_scratch_free(usbvision); - usbvision_sbuf_free(usbvision); usbvision->user--; |