diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/common/saa7146_fops.c | 11 | ||||
-rw-r--r-- | drivers/media/common/saa7146_video.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stv090x.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.c | 3 | ||||
-rw-r--r-- | drivers/media/video/Kconfig | 4 | ||||
-rw-r--r-- | drivers/media/video/Makefile | 2 | ||||
-rw-r--r-- | drivers/media/video/davinci/vpfe_capture.c | 38 | ||||
-rw-r--r-- | drivers/media/video/gspca/sn9c20x.c | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca508.c | 1 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca561.c | 1 | ||||
-rw-r--r-- | drivers/media/video/gspca/stv06xx/stv06xx.c | 2 | ||||
-rw-r--r-- | drivers/media/video/hexium_gemini.c | 3 | ||||
-rw-r--r-- | drivers/media/video/hexium_orion.c | 4 | ||||
-rw-r--r-- | drivers/media/video/mx1_camera.c | 8 | ||||
-rw-r--r-- | drivers/media/video/mxb.c | 17 | ||||
-rw-r--r-- | drivers/media/video/omap24xxcam.c | 2 | ||||
-rw-r--r-- | drivers/media/video/pxa_camera.c | 11 | ||||
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 2 |
18 files changed, 60 insertions, 63 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index fd8e1f45be36..7364b9642d00 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c | |||
@@ -423,15 +423,14 @@ static void vv_callback(struct saa7146_dev *dev, unsigned long status) | |||
423 | } | 423 | } |
424 | } | 424 | } |
425 | 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) | 426 | int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) |
433 | { | 427 | { |
434 | struct saa7146_vv *vv; | 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; | ||
435 | 434 | ||
436 | vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL); | 435 | vv = kzalloc(sizeof(struct saa7146_vv), GFP_KERNEL); |
437 | if (vv == NULL) { | 436 | if (vv == NULL) { |
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 5ed75263340a..b8b2c551a1e2 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -558,9 +558,11 @@ static int vidioc_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *f | |||
558 | /* ok, accept it */ | 558 | /* ok, accept it */ |
559 | vv->ov_fb = *fb; | 559 | vv->ov_fb = *fb; |
560 | vv->ov_fmt = fmt; | 560 | vv->ov_fmt = fmt; |
561 | if (0 == vv->ov_fb.fmt.bytesperline) | 561 | |
562 | vv->ov_fb.fmt.bytesperline = | 562 | if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { |
563 | vv->ov_fb.fmt.width * fmt->depth / 8; | 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 | } | ||
564 | 566 | ||
565 | mutex_unlock(&dev->lock); | 567 | mutex_unlock(&dev->lock); |
566 | return 0; | 568 | return 0; |
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index a3c07fe0e6c4..96972804f4ad 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
@@ -4470,6 +4470,10 @@ static int stv090x_setup(struct dvb_frontend *fe) | |||
4470 | if (stv090x_write_reg(state, STV090x_TSTRES0, 0x00) < 0) | 4470 | if (stv090x_write_reg(state, STV090x_TSTRES0, 0x00) < 0) |
4471 | goto err; | 4471 | goto err; |
4472 | 4472 | ||
4473 | /* workaround for stuck DiSEqC output */ | ||
4474 | if (config->diseqc_envelope_mode) | ||
4475 | stv090x_send_diseqc_burst(fe, SEC_MINI_A); | ||
4476 | |||
4473 | return 0; | 4477 | return 0; |
4474 | err: | 4478 | err: |
4475 | dprintk(FE_ERROR, 1, "I/O error"); | 4479 | dprintk(FE_ERROR, 1, "I/O error"); |
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index 9fdf26cc6998..1500210c06cf 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -643,9 +643,6 @@ static void frontend_init(struct budget *budget) | |||
643 | &budget->i2c_adap, | 643 | &budget->i2c_adap, |
644 | &tt1600_isl6423_config); | 644 | &tt1600_isl6423_config); |
645 | 645 | ||
646 | } else { | ||
647 | dvb_frontend_detach(budget->dvb_frontend); | ||
648 | budget->dvb_frontend = NULL; | ||
649 | } | 646 | } |
650 | } | 647 | } |
651 | break; | 648 | break; |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index f8fc8654693d..9644cf760aaa 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -361,7 +361,7 @@ config VIDEO_SAA717X | |||
361 | 361 | ||
362 | config VIDEO_SAA7191 | 362 | config VIDEO_SAA7191 |
363 | tristate "Philips SAA7191 video decoder" | 363 | tristate "Philips SAA7191 video decoder" |
364 | depends on VIDEO_V4L1 && I2C | 364 | depends on VIDEO_V4L2 && I2C |
365 | ---help--- | 365 | ---help--- |
366 | Support for the Philips SAA7191 video decoder. | 366 | Support for the Philips SAA7191 video decoder. |
367 | 367 | ||
@@ -756,7 +756,7 @@ source "drivers/media/video/saa7134/Kconfig" | |||
756 | 756 | ||
757 | config VIDEO_MXB | 757 | config VIDEO_MXB |
758 | tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" | 758 | tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" |
759 | depends on PCI && VIDEO_V4L1 && I2C | 759 | depends on PCI && VIDEO_V4L2 && I2C |
760 | select VIDEO_SAA7146_VV | 760 | select VIDEO_SAA7146_VV |
761 | select VIDEO_TUNER | 761 | select VIDEO_TUNER |
762 | select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO | 762 | select VIDEO_SAA711X if VIDEO_HELPER_CHIPS_AUTO |
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index b88b6174a331..c51c386559f2 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile | |||
@@ -160,8 +160,6 @@ obj-$(CONFIG_VIDEO_MX3) += mx3_camera.o | |||
160 | obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o | 160 | obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o |
161 | obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o | 161 | obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o |
162 | 162 | ||
163 | obj-$(CONFIG_ARCH_DAVINCI) += davinci/ | ||
164 | |||
165 | obj-$(CONFIG_VIDEO_AU0828) += au0828/ | 163 | obj-$(CONFIG_VIDEO_AU0828) += au0828/ |
166 | 164 | ||
167 | obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/ | 165 | obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/ |
diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index 7cf042f9b377..398dbe71cb82 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c | |||
@@ -223,7 +223,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) | |||
223 | BUG_ON(!dev->hw_ops.get_frame_format); | 223 | BUG_ON(!dev->hw_ops.get_frame_format); |
224 | BUG_ON(!dev->hw_ops.get_pixel_format); | 224 | BUG_ON(!dev->hw_ops.get_pixel_format); |
225 | BUG_ON(!dev->hw_ops.set_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); | 226 | BUG_ON(!dev->hw_ops.set_image_window); |
228 | BUG_ON(!dev->hw_ops.get_image_window); | 227 | BUG_ON(!dev->hw_ops.get_image_window); |
229 | BUG_ON(!dev->hw_ops.get_line_length); | 228 | BUG_ON(!dev->hw_ops.get_line_length); |
@@ -1689,11 +1688,12 @@ static long vpfe_param_handler(struct file *file, void *priv, | |||
1689 | struct vpfe_device *vpfe_dev = video_drvdata(file); | 1688 | struct vpfe_device *vpfe_dev = video_drvdata(file); |
1690 | int ret = 0; | 1689 | int ret = 0; |
1691 | 1690 | ||
1692 | v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n"); | 1691 | v4l2_dbg(2, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n"); |
1693 | 1692 | ||
1694 | if (vpfe_dev->started) { | 1693 | if (vpfe_dev->started) { |
1695 | /* only allowed if streaming is not started */ | 1694 | /* only allowed if streaming is not started */ |
1696 | v4l2_err(&vpfe_dev->v4l2_dev, "device already started\n"); | 1695 | v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, |
1696 | "device already started\n"); | ||
1697 | return -EBUSY; | 1697 | return -EBUSY; |
1698 | } | 1698 | } |
1699 | 1699 | ||
@@ -1705,16 +1705,23 @@ static long vpfe_param_handler(struct file *file, void *priv, | |||
1705 | case VPFE_CMD_S_CCDC_RAW_PARAMS: | 1705 | case VPFE_CMD_S_CCDC_RAW_PARAMS: |
1706 | v4l2_warn(&vpfe_dev->v4l2_dev, | 1706 | v4l2_warn(&vpfe_dev->v4l2_dev, |
1707 | "VPFE_CMD_S_CCDC_RAW_PARAMS: experimental ioctl\n"); | 1707 | "VPFE_CMD_S_CCDC_RAW_PARAMS: experimental ioctl\n"); |
1708 | ret = ccdc_dev->hw_ops.set_params(param); | 1708 | if (ccdc_dev->hw_ops.set_params) { |
1709 | if (ret) { | 1709 | ret = ccdc_dev->hw_ops.set_params(param); |
1710 | v4l2_err(&vpfe_dev->v4l2_dev, | 1710 | if (ret) { |
1711 | "Error in setting parameters in CCDC\n"); | 1711 | v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, |
1712 | goto unlock_out; | 1712 | "Error setting parameters in CCDC\n"); |
1713 | } | 1713 | goto unlock_out; |
1714 | if (vpfe_get_ccdc_image_format(vpfe_dev, &vpfe_dev->fmt) < 0) { | 1714 | } |
1715 | v4l2_err(&vpfe_dev->v4l2_dev, | 1715 | if (vpfe_get_ccdc_image_format(vpfe_dev, |
1716 | "Invalid image format at CCDC\n"); | 1716 | &vpfe_dev->fmt) < 0) { |
1717 | goto unlock_out; | 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"); | ||
1718 | } | 1725 | } |
1719 | break; | 1726 | break; |
1720 | default: | 1727 | default: |
@@ -1830,7 +1837,7 @@ static __init int vpfe_probe(struct platform_device *pdev) | |||
1830 | if (NULL == ccdc_cfg) { | 1837 | if (NULL == ccdc_cfg) { |
1831 | v4l2_err(pdev->dev.driver, | 1838 | v4l2_err(pdev->dev.driver, |
1832 | "Memory allocation failed for ccdc_cfg\n"); | 1839 | "Memory allocation failed for ccdc_cfg\n"); |
1833 | goto probe_free_dev_mem; | 1840 | goto probe_free_lock; |
1834 | } | 1841 | } |
1835 | 1842 | ||
1836 | strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32); | 1843 | strncpy(ccdc_cfg->name, vpfe_cfg->ccdc, 32); |
@@ -1982,8 +1989,9 @@ probe_out_video_release: | |||
1982 | probe_out_release_irq: | 1989 | probe_out_release_irq: |
1983 | free_irq(vpfe_dev->ccdc_irq0, vpfe_dev); | 1990 | free_irq(vpfe_dev->ccdc_irq0, vpfe_dev); |
1984 | probe_free_ccdc_cfg_mem: | 1991 | probe_free_ccdc_cfg_mem: |
1985 | mutex_unlock(&ccdc_lock); | ||
1986 | kfree(ccdc_cfg); | 1992 | kfree(ccdc_cfg); |
1993 | probe_free_lock: | ||
1994 | mutex_unlock(&ccdc_lock); | ||
1987 | probe_free_dev_mem: | 1995 | probe_free_dev_mem: |
1988 | kfree(vpfe_dev); | 1996 | kfree(vpfe_dev); |
1989 | return ret; | 1997 | return ret; |
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index 38a6e15e096b..3dee3e5844b6 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c | |||
@@ -1427,7 +1427,7 @@ static int input_kthread(void *data) | |||
1427 | struct gspca_dev *gspca_dev = (struct gspca_dev *)data; | 1427 | struct gspca_dev *gspca_dev = (struct gspca_dev *)data; |
1428 | struct sd *sd = (struct sd *) gspca_dev; | 1428 | struct sd *sd = (struct sd *) gspca_dev; |
1429 | 1429 | ||
1430 | DECLARE_WAIT_QUEUE_HEAD(wait); | 1430 | DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait); |
1431 | set_freezable(); | 1431 | set_freezable(); |
1432 | for (;;) { | 1432 | for (;;) { |
1433 | if (kthread_should_stop()) | 1433 | if (kthread_should_stop()) |
diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c index 15b2eef8a3f6..edf0fe157501 100644 --- a/drivers/media/video/gspca/spca508.c +++ b/drivers/media/video/gspca/spca508.c | |||
@@ -1513,7 +1513,6 @@ static const struct sd_desc sd_desc = { | |||
1513 | static const __devinitdata struct usb_device_id device_table[] = { | 1513 | static const __devinitdata struct usb_device_id device_table[] = { |
1514 | {USB_DEVICE(0x0130, 0x0130), .driver_info = HamaUSBSightcam}, | 1514 | {USB_DEVICE(0x0130, 0x0130), .driver_info = HamaUSBSightcam}, |
1515 | {USB_DEVICE(0x041e, 0x4018), .driver_info = CreativeVista}, | 1515 | {USB_DEVICE(0x041e, 0x4018), .driver_info = CreativeVista}, |
1516 | {USB_DEVICE(0x0461, 0x0815), .driver_info = MicroInnovationIC200}, | ||
1517 | {USB_DEVICE(0x0733, 0x0110), .driver_info = ViewQuestVQ110}, | 1516 | {USB_DEVICE(0x0733, 0x0110), .driver_info = ViewQuestVQ110}, |
1518 | {USB_DEVICE(0x0af9, 0x0010), .driver_info = HamaUSBSightcam}, | 1517 | {USB_DEVICE(0x0af9, 0x0010), .driver_info = HamaUSBSightcam}, |
1519 | {USB_DEVICE(0x0af9, 0x0011), .driver_info = HamaUSBSightcam2}, | 1518 | {USB_DEVICE(0x0af9, 0x0011), .driver_info = HamaUSBSightcam2}, |
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index dc7f2b0fbc79..b9c80e2103b9 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c | |||
@@ -1053,6 +1053,7 @@ static const __devinitdata struct usb_device_id device_table[] = { | |||
1053 | {USB_DEVICE(0x041e, 0x401a), .driver_info = Rev072A}, | 1053 | {USB_DEVICE(0x041e, 0x401a), .driver_info = Rev072A}, |
1054 | {USB_DEVICE(0x041e, 0x403b), .driver_info = Rev012A}, | 1054 | {USB_DEVICE(0x041e, 0x403b), .driver_info = Rev012A}, |
1055 | {USB_DEVICE(0x0458, 0x7004), .driver_info = Rev072A}, | 1055 | {USB_DEVICE(0x0458, 0x7004), .driver_info = Rev072A}, |
1056 | {USB_DEVICE(0x0461, 0x0815), .driver_info = Rev072A}, | ||
1056 | {USB_DEVICE(0x046d, 0x0928), .driver_info = Rev012A}, | 1057 | {USB_DEVICE(0x046d, 0x0928), .driver_info = Rev012A}, |
1057 | {USB_DEVICE(0x046d, 0x0929), .driver_info = Rev012A}, | 1058 | {USB_DEVICE(0x046d, 0x0929), .driver_info = Rev012A}, |
1058 | {USB_DEVICE(0x046d, 0x092a), .driver_info = Rev012A}, | 1059 | {USB_DEVICE(0x046d, 0x092a), .driver_info = Rev012A}, |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index af73da34c83f..14f179a19485 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c | |||
@@ -524,8 +524,6 @@ static const __devinitdata struct usb_device_id device_table[] = { | |||
524 | {USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 }, | 524 | {USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 }, |
525 | /* QuickCam Messenger (new) */ | 525 | /* QuickCam Messenger (new) */ |
526 | {USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 }, | 526 | {USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 }, |
527 | /* QuickCam Messenger (new) */ | ||
528 | {USB_DEVICE(0x046D, 0x08DA), .driver_info = BRIDGE_ST6422 }, | ||
529 | {} | 527 | {} |
530 | }; | 528 | }; |
531 | MODULE_DEVICE_TABLE(usb, device_table); | 529 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c index e620a3a92f25..ad2c232baa6d 100644 --- a/drivers/media/video/hexium_gemini.c +++ b/drivers/media/video/hexium_gemini.c | |||
@@ -356,9 +356,6 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d | |||
356 | 356 | ||
357 | DEB_EE((".\n")); | 357 | DEB_EE((".\n")); |
358 | 358 | ||
359 | ret = saa7146_vv_devinit(dev); | ||
360 | if (ret) | ||
361 | return ret; | ||
362 | hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); | 359 | hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); |
363 | if (NULL == hexium) { | 360 | if (NULL == hexium) { |
364 | printk("hexium_gemini: not enough kernel memory in hexium_attach().\n"); | 361 | printk("hexium_gemini: not enough kernel memory in hexium_attach().\n"); |
diff --git a/drivers/media/video/hexium_orion.c b/drivers/media/video/hexium_orion.c index fe596a1c12a8..938a1f8f880a 100644 --- a/drivers/media/video/hexium_orion.c +++ b/drivers/media/video/hexium_orion.c | |||
@@ -216,10 +216,6 @@ static int hexium_probe(struct saa7146_dev *dev) | |||
216 | return -EFAULT; | 216 | return -EFAULT; |
217 | } | 217 | } |
218 | 218 | ||
219 | err = saa7146_vv_devinit(dev); | ||
220 | if (err) | ||
221 | return err; | ||
222 | |||
223 | hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); | 219 | hexium = kzalloc(sizeof(struct hexium), GFP_KERNEL); |
224 | if (NULL == hexium) { | 220 | if (NULL == hexium) { |
225 | printk("hexium_orion: hexium_probe: not enough kernel memory.\n"); | 221 | printk("hexium_orion: hexium_probe: not enough kernel memory.\n"); |
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c index 3c8ebfcb742e..34a66019190e 100644 --- a/drivers/media/video/mx1_camera.c +++ b/drivers/media/video/mx1_camera.c | |||
@@ -49,8 +49,6 @@ | |||
49 | /* | 49 | /* |
50 | * CSI registers | 50 | * CSI registers |
51 | */ | 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 */ | 52 | #define CSICR1 0x00 /* CSI Control Register 1 */ |
55 | #define CSISR 0x08 /* CSI Status Register */ | 53 | #define CSISR 0x08 /* CSI Status Register */ |
56 | #define CSIRXR 0x10 /* CSI RxFIFO Register */ | 54 | #define CSIRXR 0x10 /* CSI RxFIFO Register */ |
@@ -784,7 +782,7 @@ static int __init mx1_camera_probe(struct platform_device *pdev) | |||
784 | pcdev); | 782 | pcdev); |
785 | 783 | ||
786 | imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO, | 784 | imx_dma_config_channel(pcdev->dma_chan, IMX_DMA_TYPE_FIFO, |
787 | IMX_DMA_MEMSIZE_32, DMA_REQ_CSI_R, 0); | 785 | IMX_DMA_MEMSIZE_32, MX1_DMA_REQ_CSI_R, 0); |
788 | /* burst length : 16 words = 64 bytes */ | 786 | /* burst length : 16 words = 64 bytes */ |
789 | imx_dma_config_burstlen(pcdev->dma_chan, 0); | 787 | imx_dma_config_burstlen(pcdev->dma_chan, 0); |
790 | 788 | ||
@@ -798,8 +796,8 @@ static int __init mx1_camera_probe(struct platform_device *pdev) | |||
798 | set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end - | 796 | set_fiq_handler(&mx1_camera_sof_fiq_start, &mx1_camera_sof_fiq_end - |
799 | &mx1_camera_sof_fiq_start); | 797 | &mx1_camera_sof_fiq_start); |
800 | 798 | ||
801 | regs.ARM_r8 = DMA_BASE + DMA_DIMR; | 799 | regs.ARM_r8 = (long)MX1_DMA_DIMR; |
802 | regs.ARM_r9 = DMA_BASE + DMA_CCR(pcdev->dma_chan); | 800 | regs.ARM_r9 = (long)MX1_DMA_CCR(pcdev->dma_chan); |
803 | regs.ARM_r10 = (long)pcdev->base + CSICR1; | 801 | regs.ARM_r10 = (long)pcdev->base + CSICR1; |
804 | regs.ARM_fp = (long)pcdev->base + CSISR; | 802 | regs.ARM_fp = (long)pcdev->base + CSISR; |
805 | regs.ARM_sp = 1 << pcdev->dma_chan; | 803 | regs.ARM_sp = 1 << pcdev->dma_chan; |
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index 9f01f14e4aa2..ef0c8178f255 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c | |||
@@ -169,11 +169,7 @@ static struct saa7146_extension extension; | |||
169 | static int mxb_probe(struct saa7146_dev *dev) | 169 | static int mxb_probe(struct saa7146_dev *dev) |
170 | { | 170 | { |
171 | struct mxb *mxb = NULL; | 171 | struct mxb *mxb = NULL; |
172 | int err; | ||
173 | 172 | ||
174 | err = saa7146_vv_devinit(dev); | ||
175 | if (err) | ||
176 | return err; | ||
177 | mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL); | 173 | mxb = kzalloc(sizeof(struct mxb), GFP_KERNEL); |
178 | if (mxb == NULL) { | 174 | if (mxb == NULL) { |
179 | DEB_D(("not enough kernel memory.\n")); | 175 | DEB_D(("not enough kernel memory.\n")); |
@@ -699,14 +695,17 @@ static struct saa7146_ext_vv vv_data; | |||
699 | /* this function only gets called when the probing was successful */ | 695 | /* 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) | 696 | static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data *info) |
701 | { | 697 | { |
702 | struct mxb *mxb = (struct mxb *)dev->ext_priv; | 698 | struct mxb *mxb; |
703 | 699 | ||
704 | DEB_EE(("dev:%p\n", dev)); | 700 | DEB_EE(("dev:%p\n", dev)); |
705 | 701 | ||
706 | /* checking for i2c-devices can be omitted here, because we | ||
707 | already did this in "mxb_vl42_probe" */ | ||
708 | |||
709 | saa7146_vv_init(dev, &vv_data); | 702 | saa7146_vv_init(dev, &vv_data); |
703 | if (mxb_probe(dev)) { | ||
704 | saa7146_vv_release(dev); | ||
705 | return -1; | ||
706 | } | ||
707 | mxb = (struct mxb *)dev->ext_priv; | ||
708 | |||
710 | vv_data.ops.vidioc_queryctrl = vidioc_queryctrl; | 709 | vv_data.ops.vidioc_queryctrl = vidioc_queryctrl; |
711 | vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl; | 710 | vv_data.ops.vidioc_g_ctrl = vidioc_g_ctrl; |
712 | vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl; | 711 | vv_data.ops.vidioc_s_ctrl = vidioc_s_ctrl; |
@@ -726,6 +725,7 @@ static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data | |||
726 | vv_data.ops.vidioc_default = vidioc_default; | 725 | vv_data.ops.vidioc_default = vidioc_default; |
727 | if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) { | 726 | if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) { |
728 | ERR(("cannot register capture v4l2 device. skipping.\n")); | 727 | ERR(("cannot register capture v4l2 device. skipping.\n")); |
728 | saa7146_vv_release(dev); | ||
729 | return -1; | 729 | return -1; |
730 | } | 730 | } |
731 | 731 | ||
@@ -846,7 +846,6 @@ static struct saa7146_extension extension = { | |||
846 | .pci_tbl = &pci_tbl[0], | 846 | .pci_tbl = &pci_tbl[0], |
847 | .module = THIS_MODULE, | 847 | .module = THIS_MODULE, |
848 | 848 | ||
849 | .probe = mxb_probe, | ||
850 | .attach = mxb_attach, | 849 | .attach = mxb_attach, |
851 | .detach = mxb_detach, | 850 | .detach = mxb_detach, |
852 | 851 | ||
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index b189fe63394b..ce76d952e161 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c | |||
@@ -1405,7 +1405,7 @@ static int omap24xxcam_mmap_buffers(struct file *file, | |||
1405 | } | 1405 | } |
1406 | 1406 | ||
1407 | size = 0; | 1407 | size = 0; |
1408 | for (i = first; i <= last; i++) { | 1408 | for (i = first; i <= last && i < VIDEO_MAX_FRAME; i++) { |
1409 | struct videobuf_dmabuf *dma = videobuf_to_dma(vbq->bufs[i]); | 1409 | struct videobuf_dmabuf *dma = videobuf_to_dma(vbq->bufs[i]); |
1410 | 1410 | ||
1411 | for (j = 0; j < dma->sglen; j++) { | 1411 | for (j = 0; j < dma->sglen; j++) { |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 5ecc30daef2d..04bf5c11308d 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -609,12 +609,9 @@ static void pxa_dma_add_tail_buf(struct pxa_camera_dev *pcdev, | |||
609 | */ | 609 | */ |
610 | static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev) | 610 | static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev) |
611 | { | 611 | { |
612 | unsigned long cicr0, cifr; | 612 | unsigned long cicr0; |
613 | 613 | ||
614 | dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s\n", __func__); | 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 */ | 615 | /* Enable End-Of-Frame Interrupt */ |
619 | cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB; | 616 | cicr0 = __raw_readl(pcdev->base + CICR0) | CICR0_ENB; |
620 | cicr0 &= ~CICR0_EOFM; | 617 | cicr0 &= ~CICR0_EOFM; |
@@ -935,7 +932,7 @@ static void pxa_camera_deactivate(struct pxa_camera_dev *pcdev) | |||
935 | static irqreturn_t pxa_camera_irq(int irq, void *data) | 932 | static irqreturn_t pxa_camera_irq(int irq, void *data) |
936 | { | 933 | { |
937 | struct pxa_camera_dev *pcdev = data; | 934 | struct pxa_camera_dev *pcdev = data; |
938 | unsigned long status, cicr0; | 935 | unsigned long status, cifr, cicr0; |
939 | struct pxa_buffer *buf; | 936 | struct pxa_buffer *buf; |
940 | struct videobuf_buffer *vb; | 937 | struct videobuf_buffer *vb; |
941 | 938 | ||
@@ -949,6 +946,10 @@ static irqreturn_t pxa_camera_irq(int irq, void *data) | |||
949 | __raw_writel(status, pcdev->base + CISR); | 946 | __raw_writel(status, pcdev->base + CISR); |
950 | 947 | ||
951 | if (status & CISR_EOF) { | 948 | if (status & CISR_EOF) { |
949 | /* Reset the FIFOs */ | ||
950 | cifr = __raw_readl(pcdev->base + CIFR) | CIFR_RESET_F; | ||
951 | __raw_writel(cifr, pcdev->base + CIFR); | ||
952 | |||
952 | pcdev->active = list_first_entry(&pcdev->capture, | 953 | pcdev->active = list_first_entry(&pcdev->capture, |
953 | struct pxa_buffer, vb.queue); | 954 | struct pxa_buffer, vb.queue); |
954 | vb = &pcdev->active->vb; | 955 | vb = &pcdev->active->vb; |
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 6e16b3979326..1ad980f8e770 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -1633,7 +1633,7 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd, | |||
1633 | height = pix->height; | 1633 | height = pix->height; |
1634 | 1634 | ||
1635 | pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); | 1635 | pix->bytesperline = soc_mbus_bytes_per_line(width, xlate->host_fmt); |
1636 | if (pix->bytesperline < 0) | 1636 | if ((int)pix->bytesperline < 0) |
1637 | return pix->bytesperline; | 1637 | return pix->bytesperline; |
1638 | pix->sizeimage = height * pix->bytesperline; | 1638 | pix->sizeimage = height * pix->bytesperline; |
1639 | 1639 | ||