Merge branch 'v4l_for_2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
V4L/DVB: pxa_camera: move fifo reset direct before dma start
V4L/DVB: video: testing unsigned for less than 0
V4L/DVB: mx1-camera: compile fix
V4L/DVB: budget: Oops: "BUG: unable to handle kernel NULL pointer dereference"
V4L/DVB: ngene: Workaround for stuck DiSEqC pin
V4L/DVB: saa7146: fix regression of the av7110/budget-av driver
V4L/DVB: v4l: fix config dependencies: mxb and saa7191 are V4L2 drivers, not V4L1
V4L/DVB: feature-removal: announce videotext.h removal
V4L/DVB: V4L - vpfe capture - fix for kernel crash
V4L/DVB: gspca: make usb id 0461:0815 get handled by the right driver
V4L/DVB: gspca - stv06xx: Remove the 046d:08da from the stv06xx driver
V4L/DVB: gspca - sn9c20x: Correct onstack wait_queue_head declaration
V4L/DVB: saa7146: fix up bytesperline if it is an impossible value
V4L/DVB: V4L: vpfe_capture - free ccdc_lock when memory allocation fails
V4L/DVB: V4L - Makfile:Removed duplicate entry of davinci
V4L/DVB: omap24xxcam: potential buffer overflow

+90 -65
+23
Documentation/feature-removal-schedule.txt
··· 589 Generally invoked by accident today. 590 Seen as doing more harm than good. 591 Who: Len Brown <len.brown@intel.com>
··· 589 Generally invoked by accident today. 590 Seen as doing more harm than good. 591 Who: Len Brown <len.brown@intel.com> 592 + 593 + ---------------------------- 594 + 595 + What: video4linux /dev/vtx teletext API support 596 + When: 2.6.35 597 + Files: drivers/media/video/saa5246a.c drivers/media/video/saa5249.c 598 + include/linux/videotext.h 599 + Why: The vtx device nodes have been superseded by vbi device nodes 600 + for many years. No applications exist that use the vtx support. 601 + Of the two i2c drivers that actually support this API the saa5249 602 + has been impossible to use for a year now and no known hardware 603 + that supports this device exists. The saa5246a is theoretically 604 + supported by the old mxb boards, but it never actually worked. 605 + 606 + In summary: there is no hardware that can use this API and there 607 + are no applications actually implementing this API. 608 + 609 + The vtx support still reserves minors 192-223 and we would really 610 + like to reuse those for upcoming new functionality. In the unlikely 611 + event that new hardware appears that wants to use the functionality 612 + provided by the vtx API, then that functionality should be build 613 + around the sliced VBI API instead. 614 + Who: Hans Verkuil <hverkuil@xs4all.nl>
+7 -1
arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
··· 31 #define DMA_MODE_WRITE 1 32 #define DMA_MODE_MASK 1 33 34 - #define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) 35 36 #define IMX_DMA_MEMSIZE_32 (0 << 4) 37 #define IMX_DMA_MEMSIZE_8 (1 << 4)
··· 31 #define DMA_MODE_WRITE 1 32 #define DMA_MODE_MASK 1 33 34 + #define MX1_DMA_REG(offset) MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR + (offset)) 35 + 36 + /* DMA Interrupt Mask Register */ 37 + #define MX1_DMA_DIMR MX1_DMA_REG(0x08) 38 + 39 + /* Channel Control Register */ 40 + #define MX1_DMA_CCR(x) MX1_DMA_REG(0x8c + ((x) << 6)) 41 42 #define IMX_DMA_MEMSIZE_32 (0 << 4) 43 #define IMX_DMA_MEMSIZE_8 (1 << 4)
+5 -6
drivers/media/common/saa7146_fops.c
··· 423 } 424 } 425 426 - int saa7146_vv_devinit(struct saa7146_dev *dev) 427 - { 428 - return v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev); 429 - } 430 - EXPORT_SYMBOL_GPL(saa7146_vv_devinit); 431 - 432 int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) 433 { 434 struct saa7146_vv *vv; 435 436 vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL); 437 if (vv == NULL) {
··· 423 } 424 } 425 426 int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) 427 { 428 struct saa7146_vv *vv; 429 + int err; 430 + 431 + err = v4l2_device_register(&dev->pci->dev, &dev->v4l2_dev); 432 + if (err) 433 + return err; 434 435 vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL); 436 if (vv == NULL) {
+5 -3
drivers/media/common/saa7146_video.c
··· 558 /* ok, accept it */ 559 vv->ov_fb = *fb; 560 vv->ov_fmt = fmt; 561 - if (0 == vv->ov_fb.fmt.bytesperline) 562 - vv->ov_fb.fmt.bytesperline = 563 - vv->ov_fb.fmt.width * fmt->depth / 8; 564 565 mutex_unlock(&dev->lock); 566 return 0;
··· 558 /* ok, accept it */ 559 vv->ov_fb = *fb; 560 vv->ov_fmt = fmt; 561 + 562 + if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { 563 + vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8; 564 + DEB_D(("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline)); 565 + } 566 567 mutex_unlock(&dev->lock); 568 return 0;
+4
drivers/media/dvb/frontends/stv090x.c
··· 4470 if (stv090x_write_reg(state, STV090x_TSTRES0, 0x00) < 0) 4471 goto err; 4472 4473 return 0; 4474 err: 4475 dprintk(FE_ERROR, 1, "I/O error");
··· 4470 if (stv090x_write_reg(state, STV090x_TSTRES0, 0x00) < 0) 4471 goto err; 4472 4473 + /* workaround for stuck DiSEqC output */ 4474 + if (config->diseqc_envelope_mode) 4475 + stv090x_send_diseqc_burst(fe, SEC_MINI_A); 4476 + 4477 return 0; 4478 err: 4479 dprintk(FE_ERROR, 1, "I/O error");
-3
drivers/media/dvb/ttpci/budget.c
··· 643 &budget->i2c_adap, 644 &tt1600_isl6423_config); 645 646 - } else { 647 - dvb_frontend_detach(budget->dvb_frontend); 648 - budget->dvb_frontend = NULL; 649 } 650 } 651 break;
··· 643 &budget->i2c_adap, 644 &tt1600_isl6423_config); 645 646 } 647 } 648 break;
+2 -2
drivers/media/video/Kconfig
··· 361 362 config VIDEO_SAA7191 363 tristate "Philips SAA7191 video decoder" 364 - depends on VIDEO_V4L1 && I2C 365 ---help--- 366 Support for the Philips SAA7191 video decoder. 367 ··· 756 757 config VIDEO_MXB 758 tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" 759 - depends on PCI && VIDEO_V4L1 && I2C 760 select VIDEO_SAA7146_VV 761 select VIDEO_TUNER 762 select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
··· 361 362 config VIDEO_SAA7191 363 tristate "Philips SAA7191 video decoder" 364 + depends on VIDEO_V4L2 && I2C 365 ---help--- 366 Support for the Philips SAA7191 video decoder. 367 ··· 756 757 config VIDEO_MXB 758 tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" 759 + depends on PCI && VIDEO_V4L2 && I2C 760 select VIDEO_SAA7146_VV 761 select VIDEO_TUNER 762 select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO
-2
drivers/media/video/Makefile
··· 160 obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o 161 obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o 162 163 - obj-$(CONFIG_ARCH_DAVINCI) += davinci/ 164 - 165 obj-$(CONFIG_VIDEO_AU0828) += au0828/ 166 167 obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/
··· 160 obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o 161 obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o 162 163 obj-$(CONFIG_VIDEO_AU0828) += au0828/ 164 165 obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/
+23 -15
drivers/media/video/davinci/vpfe_capture.c
··· 223 BUG_ON(!dev->hw_ops.get_frame_format); 224 BUG_ON(!dev->hw_ops.get_pixel_format); 225 BUG_ON(!dev->hw_ops.set_pixel_format); 226 - BUG_ON(!dev->hw_ops.set_params); 227 BUG_ON(!dev->hw_ops.set_image_window); 228 BUG_ON(!dev->hw_ops.get_image_window); 229 BUG_ON(!dev->hw_ops.get_line_length); ··· 1688 struct vpfe_device *vpfe_dev = video_drvdata(file); 1689 int ret = 0; 1690 1691 - v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n"); 1692 1693 if (vpfe_dev->started) { 1694 /* only allowed if streaming is not started */ 1695 - v4l2_err(&vpfe_dev->v4l2_dev, "device already started\n"); 1696 return -EBUSY; 1697 } 1698 ··· 1705 case VPFE_CMD_S_CCDC_RAW_PARAMS: 1706 v4l2_warn(&vpfe_dev->v4l2_dev, 1707 "VPFE_CMD_S_CCDC_RAW_PARAMS: experimental ioctl\n"); 1708 - ret = ccdc_dev->hw_ops.set_params(param); 1709 - if (ret) { 1710 - v4l2_err(&vpfe_dev->v4l2_dev, 1711 - "Error in setting parameters in CCDC\n"); 1712 - goto unlock_out; 1713 - } 1714 - if (vpfe_get_ccdc_image_format(vpfe_dev, &vpfe_dev->fmt) < 0) { 1715 - v4l2_err(&vpfe_dev->v4l2_dev, 1716 - "Invalid image format at CCDC\n"); 1717 - goto unlock_out; 1718 } 1719 break; 1720 default: ··· 1837 if (NULL == ccdc_cfg) { 1838 v4l2_err(pdev->dev.driver, 1839 "Memory allocation failed for ccdc_cfg\n"); 1840 - goto probe_free_dev_mem; 1841 } 1842 1843 strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32); ··· 1989 probe_out_release_irq: 1990 free_irq(vpfe_dev->ccdc_irq0, vpfe_dev); 1991 probe_free_ccdc_cfg_mem: 1992 - mutex_unlock(&ccdc_lock); 1993 kfree(ccdc_cfg); 1994 probe_free_dev_mem: 1995 kfree(vpfe_dev); 1996 return ret;
··· 223 BUG_ON(!dev->hw_ops.get_frame_format); 224 BUG_ON(!dev->hw_ops.get_pixel_format); 225 BUG_ON(!dev->hw_ops.set_pixel_format); 226 BUG_ON(!dev->hw_ops.set_image_window); 227 BUG_ON(!dev->hw_ops.get_image_window); 228 BUG_ON(!dev->hw_ops.get_line_length); ··· 1689 struct vpfe_device *vpfe_dev = video_drvdata(file); 1690 int ret = 0; 1691 1692 + v4l2_dbg(2, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n"); 1693 1694 if (vpfe_dev->started) { 1695 /* only allowed if streaming is not started */ 1696 + v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, 1697 + "device already started\n"); 1698 return -EBUSY; 1699 } 1700 ··· 1705 case VPFE_CMD_S_CCDC_RAW_PARAMS: 1706 v4l2_warn(&vpfe_dev->v4l2_dev, 1707 "VPFE_CMD_S_CCDC_RAW_PARAMS: experimental ioctl\n"); 1708 + if (ccdc_dev->hw_ops.set_params) { 1709 + ret = ccdc_dev->hw_ops.set_params(param); 1710 + if (ret) { 1711 + v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, 1712 + "Error setting parameters in CCDC\n"); 1713 + goto unlock_out; 1714 + } 1715 + if (vpfe_get_ccdc_image_format(vpfe_dev, 1716 + &vpfe_dev->fmt) < 0) { 1717 + v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, 1718 + "Invalid image format at CCDC\n"); 1719 + goto unlock_out; 1720 + } 1721 + } else { 1722 + ret = -EINVAL; 1723 + v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, 1724 + "VPFE_CMD_S_CCDC_RAW_PARAMS not supported\n"); 1725 } 1726 break; 1727 default: ··· 1830 if (NULL == ccdc_cfg) { 1831 v4l2_err(pdev->dev.driver, 1832 "Memory allocation failed for ccdc_cfg\n"); 1833 + goto probe_free_lock; 1834 } 1835 1836 strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32); ··· 1982 probe_out_release_irq: 1983 free_irq(vpfe_dev->ccdc_irq0, vpfe_dev); 1984 probe_free_ccdc_cfg_mem: 1985 kfree(ccdc_cfg); 1986 + probe_free_lock: 1987 + mutex_unlock(&ccdc_lock); 1988 probe_free_dev_mem: 1989 kfree(vpfe_dev); 1990 return ret;
+1 -1
drivers/media/video/gspca/sn9c20x.c
··· 1427 struct gspca_dev *gspca_dev = (struct gspca_dev *)data; 1428 struct sd *sd = (struct sd *) gspca_dev; 1429 1430 - DECLARE_WAIT_QUEUE_HEAD(wait); 1431 set_freezable(); 1432 for (;;) { 1433 if (kthread_should_stop())
··· 1427 struct gspca_dev *gspca_dev = (struct gspca_dev *)data; 1428 struct sd *sd = (struct sd *) gspca_dev; 1429 1430 + DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait); 1431 set_freezable(); 1432 for (;;) { 1433 if (kthread_should_stop())
-1
drivers/media/video/gspca/spca508.c
··· 1513 static const __devinitdata struct usb_device_id device_table[] = { 1514 {USB_DEVICE(0x0130, 0x0130), .driver_info = HamaUSBSightcam}, 1515 {USB_DEVICE(0x041e, 0x4018), .driver_info = CreativeVista}, 1516 - {USB_DEVICE(0x0461, 0x0815), .driver_info = MicroInnovationIC200}, 1517 {USB_DEVICE(0x0733, 0x0110), .driver_info = ViewQuestVQ110}, 1518 {USB_DEVICE(0x0af9, 0x0010), .driver_info = HamaUSBSightcam}, 1519 {USB_DEVICE(0x0af9, 0x0011), .driver_info = HamaUSBSightcam2},
··· 1513 static const __devinitdata struct usb_device_id device_table[] = { 1514 {USB_DEVICE(0x0130, 0x0130), .driver_info = HamaUSBSightcam}, 1515 {USB_DEVICE(0x041e, 0x4018), .driver_info = CreativeVista}, 1516 {USB_DEVICE(0x0733, 0x0110), .driver_info = ViewQuestVQ110}, 1517 {USB_DEVICE(0x0af9, 0x0010), .driver_info = HamaUSBSightcam}, 1518 {USB_DEVICE(0x0af9, 0x0011), .driver_info = HamaUSBSightcam2},
+1
drivers/media/video/gspca/spca561.c
··· 1053 {USB_DEVICE(0x041e, 0x401a), .driver_info = Rev072A}, 1054 {USB_DEVICE(0x041e, 0x403b), .driver_info = Rev012A}, 1055 {USB_DEVICE(0x0458, 0x7004), .driver_info = Rev072A}, 1056 {USB_DEVICE(0x046d, 0x0928), .driver_info = Rev012A}, 1057 {USB_DEVICE(0x046d, 0x0929), .driver_info = Rev012A}, 1058 {USB_DEVICE(0x046d, 0x092a), .driver_info = Rev012A},
··· 1053 {USB_DEVICE(0x041e, 0x401a), .driver_info = Rev072A}, 1054 {USB_DEVICE(0x041e, 0x403b), .driver_info = Rev012A}, 1055 {USB_DEVICE(0x0458, 0x7004), .driver_info = Rev072A}, 1056 + {USB_DEVICE(0x0461, 0x0815), .driver_info = Rev072A}, 1057 {USB_DEVICE(0x046d, 0x0928), .driver_info = Rev012A}, 1058 {USB_DEVICE(0x046d, 0x0929), .driver_info = Rev012A}, 1059 {USB_DEVICE(0x046d, 0x092a), .driver_info = Rev012A},
-2
drivers/media/video/gspca/stv06xx/stv06xx.c
··· 524 {USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 }, 525 /* QuickCam Messenger (new) */ 526 {USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 }, 527 - /* QuickCam Messenger (new) */ 528 - {USB_DEVICE(0x046D, 0x08DA), .driver_info = BRIDGE_ST6422 }, 529 {} 530 }; 531 MODULE_DEVICE_TABLE(usb, device_table);
··· 524 {USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 }, 525 /* QuickCam Messenger (new) */ 526 {USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 }, 527 {} 528 }; 529 MODULE_DEVICE_TABLE(usb, device_table);
-3
drivers/media/video/hexium_gemini.c
··· 356 357 DEB_EE((".\n")); 358 359 - ret = saa7146_vv_devinit(dev); 360 - if (ret) 361 - return ret; 362 hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); 363 if (NULL == hexium) { 364 printk("hexium_gemini: not enough kernel memory in hexium_attach().\n");
··· 356 357 DEB_EE((".\n")); 358 359 hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); 360 if (NULL == hexium) { 361 printk("hexium_gemini: not enough kernel memory in hexium_attach().\n");
-4
drivers/media/video/hexium_orion.c
··· 216 return -EFAULT; 217 } 218 219 - err = saa7146_vv_devinit(dev); 220 - if (err) 221 - return err; 222 - 223 hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); 224 if (NULL == hexium) { 225 printk("hexium_orion: hexium_probe: not enough kernel memory.\n");
··· 216 return -EFAULT; 217 } 218 219 hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); 220 if (NULL == hexium) { 221 printk("hexium_orion: hexium_probe: not enough kernel memory.\n");
+3 -5
drivers/media/video/mx1_camera.c
··· 49 /* 50 * CSI registers 51 */ 52 - #define DMA_CCR(x) (0x8c + ((x) << 6)) /* Control Registers */ 53 - #define DMA_DIMR 0x08 /* Interrupt mask Register */ 54 #define CSICR1 0x00 /* CSI Control Register 1 */ 55 #define CSISR 0x08 /* CSI Status Register */ 56 #define CSIRXR 0x10 /* CSI RxFIFO Register */ ··· 782 pcdev); 783 784 imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO, 785 - IMX_DMA_MEMSIZE_32, DMA_REQ_CSI_R, 0); 786 /* burst length : 16 words = 64 bytes */ 787 imx_dma_config_burstlen(pcdev->dma_chan, 0); 788 ··· 796 set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end - 797 &mx1_camera_sof_fiq_start); 798 799 - regs.ARM_r8 = DMA_BASE + DMA_DIMR; 800 - regs.ARM_r9 = DMA_BASE + DMA_CCR(pcdev->dma_chan); 801 regs.ARM_r10 = (long)pcdev->base + CSICR1; 802 regs.ARM_fp = (long)pcdev->base + CSISR; 803 regs.ARM_sp = 1 << pcdev->dma_chan;
··· 49 /* 50 * CSI registers 51 */ 52 #define CSICR1 0x00 /* CSI Control Register 1 */ 53 #define CSISR 0x08 /* CSI Status Register */ 54 #define CSIRXR 0x10 /* CSI RxFIFO Register */ ··· 784 pcdev); 785 786 imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO, 787 + IMX_DMA_MEMSIZE_32, MX1_DMA_REQ_CSI_R, 0); 788 /* burst length : 16 words = 64 bytes */ 789 imx_dma_config_burstlen(pcdev->dma_chan, 0); 790 ··· 798 set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end - 799 &mx1_camera_sof_fiq_start); 800 801 + regs.ARM_r8 = (long)MX1_DMA_DIMR; 802 + regs.ARM_r9 = (long)MX1_DMA_CCR(pcdev->dma_chan); 803 regs.ARM_r10 = (long)pcdev->base + CSICR1; 804 regs.ARM_fp = (long)pcdev->base + CSISR; 805 regs.ARM_sp = 1 << pcdev->dma_chan;
+8 -9
drivers/media/video/mxb.c
··· 169 static int mxb_probe(struct saa7146_dev *dev) 170 { 171 struct mxb *mxb = NULL; 172 - int err; 173 174 - err = saa7146_vv_devinit(dev); 175 - if (err) 176 - return err; 177 mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL); 178 if (mxb == NULL) { 179 DEB_D(("not enough kernel memory.\n")); ··· 695 /* this function only gets called when the probing was successful */ 696 static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info) 697 { 698 - struct mxb *mxb = (struct mxb *)dev->ext_priv; 699 700 DEB_EE(("dev:%p\n", dev)); 701 702 - /* checking for i2c-devices can be omitted here, because we 703 - already did this in "mxb_vl42_probe" */ 704 - 705 saa7146_vv_init(dev, &vv_data); 706 vv_data.ops.vidioc_queryctrl = vidioc_queryctrl; 707 vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl; 708 vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl; ··· 725 vv_data.ops.vidioc_default = vidioc_default; 726 if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) { 727 ERR(("cannot register capture v4l2 device. skipping.\n")); 728 return -1; 729 } 730 ··· 846 .pci_tbl = &pci_tbl[0], 847 .module = THIS_MODULE, 848 849 - .probe = mxb_probe, 850 .attach = mxb_attach, 851 .detach = mxb_detach, 852
··· 169 static int mxb_probe(struct saa7146_dev *dev) 170 { 171 struct mxb *mxb = NULL; 172 173 mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL); 174 if (mxb == NULL) { 175 DEB_D(("not enough kernel memory.\n")); ··· 699 /* this function only gets called when the probing was successful */ 700 static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info) 701 { 702 + struct mxb *mxb; 703 704 DEB_EE(("dev:%p\n", dev)); 705 706 saa7146_vv_init(dev, &vv_data); 707 + if (mxb_probe(dev)) { 708 + saa7146_vv_release(dev); 709 + return -1; 710 + } 711 + mxb = (struct mxb *)dev->ext_priv; 712 + 713 vv_data.ops.vidioc_queryctrl = vidioc_queryctrl; 714 vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl; 715 vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl; ··· 726 vv_data.ops.vidioc_default = vidioc_default; 727 if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) { 728 ERR(("cannot register capture v4l2 device. skipping.\n")); 729 + saa7146_vv_release(dev); 730 return -1; 731 } 732 ··· 846 .pci_tbl = &pci_tbl[0], 847 .module = THIS_MODULE, 848 849 .attach = mxb_attach, 850 .detach = mxb_detach, 851
+1 -1
drivers/media/video/omap24xxcam.c
··· 1405 } 1406 1407 size = 0; 1408 - for (i = first; i <= last; i++) { 1409 struct videobuf_dmabuf *dma = videobuf_to_dma(vbq->bufs[i]); 1410 1411 for (j = 0; j < dma->sglen; j++) {
··· 1405 } 1406 1407 size = 0; 1408 + for (i = first; i <= last && i < VIDEO_MAX_FRAME; i++) { 1409 struct videobuf_dmabuf *dma = videobuf_to_dma(vbq->bufs[i]); 1410 1411 for (j = 0; j < dma->sglen; j++) {
+6 -5
drivers/media/video/pxa_camera.c
··· 609 */ 610 static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev) 611 { 612 - unsigned long cicr0, cifr; 613 614 dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s\n", __func__); 615 - /* Reset the FIFOs */ 616 - cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F; 617 - __raw_writel(cifr, pcdev->base + CIFR); 618 /* Enable End-Of-Frame Interrupt */ 619 cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB; 620 cicr0 &= ~CICR0_EOFM; ··· 932 static irqreturn_t pxa_camera_irq(int irq, void *data) 933 { 934 struct pxa_camera_dev *pcdev = data; 935 - unsigned long status, cicr0; 936 struct pxa_buffer *buf; 937 struct videobuf_buffer *vb; 938 ··· 946 __raw_writel(status, pcdev->base + CISR); 947 948 if (status & CISR_EOF) { 949 pcdev->active = list_first_entry(&pcdev->capture, 950 struct pxa_buffer, vb.queue); 951 vb = &pcdev->active->vb;
··· 609 */ 610 static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev) 611 { 612 + unsigned long cicr0; 613 614 dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s\n", __func__); 615 /* Enable End-Of-Frame Interrupt */ 616 cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB; 617 cicr0 &= ~CICR0_EOFM; ··· 935 static irqreturn_t pxa_camera_irq(int irq, void *data) 936 { 937 struct pxa_camera_dev *pcdev = data; 938 + unsigned long status, cifr, cicr0; 939 struct pxa_buffer *buf; 940 struct videobuf_buffer *vb; 941 ··· 949 __raw_writel(status, pcdev->base + CISR); 950 951 if (status & CISR_EOF) { 952 + /* Reset the FIFOs */ 953 + cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F; 954 + __raw_writel(cifr, pcdev->base + CIFR); 955 + 956 pcdev->active = list_first_entry(&pcdev->capture, 957 struct pxa_buffer, vb.queue); 958 vb = &pcdev->active->vb;
+1 -1
drivers/media/video/sh_mobile_ceu_camera.c
··· 1633 height = pix->height; 1634 1635 pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); 1636 - if (pix->bytesperline < 0) 1637 return pix->bytesperline; 1638 pix->sizeimage = height * pix->bytesperline; 1639
··· 1633 height = pix->height; 1634 1635 pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); 1636 + if ((int)pix->bytesperline < 0) 1637 return pix->bytesperline; 1638 pix->sizeimage = height * pix->bytesperline; 1639
-1
include/media/saa7146_vv.h
··· 188 void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, 189 struct saa7146_buf *buf); 190 191 - int saa7146_vv_devinit(struct saa7146_dev *dev); 192 int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); 193 int saa7146_vv_release(struct saa7146_dev* dev); 194
··· 188 void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, 189 struct saa7146_buf *buf); 190 191 int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); 192 int saa7146_vv_release(struct saa7146_dev* dev); 193