Merge tag 'media/v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Jan 2015 22:34:54 +0000 (14:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Jan 2015 22:34:54 +0000 (14:34 -0800)
Pull media fixes from Mauro Carvalho Chehab:
  - fix some race conditions caused by a regression on videobuf2
  - fix a interrupt release bug on cx23885
  - fix support for Mygica T230 and HVR4400
  - fix compilation breakage when USB is not selected on tlg2300
  - fix capabilities report on ompa3isp, soc-camera, rcar_vin and
    pvrusb2

* tag 'media/v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] omap3isp: Correctly set QUERYCAP capabilities
  [media] cx23885: fix free interrupt bug
  [media] pvrusb2: fix missing device_caps in querycap
  [media] vb2: fix vb2_thread_stop race conditions
  [media] rcar_vin: Update device_caps and capabilities in querycap
  [media] soc-camera: fix device capabilities in multiple camera host drivers
  [media] Fix Mygica T230 support
  [media] cx23885: Split Hauppauge WinTV Starburst from HVR4400 card entry
  [media] tlg2300: Fix media dependencies

1  2 
drivers/media/pci/cx23885/cx23885-core.c
drivers/media/platform/soc_camera/atmel-isi.c
drivers/media/platform/soc_camera/mx3_camera.c
drivers/media/platform/soc_camera/rcar_vin.c
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c

@@@ -1078,7 -1078,7 +1078,7 @@@ static __le32 *cx23885_risc_field(__le3
        for (line = 0; line < lines; line++) {
                while (offset && offset >= sg_dma_len(sg)) {
                        offset -= sg_dma_len(sg);
 -                      sg++;
 +                      sg = sg_next(sg);
                }
  
                if (lpi && line > 0 && !(line % lpi))
                        *(rp++) = cpu_to_le32(0); /* bits 63-32 */
                        todo -= (sg_dma_len(sg)-offset);
                        offset = 0;
 -                      sg++;
 +                      sg = sg_next(sg);
                        while (todo > sg_dma_len(sg)) {
                                *(rp++) = cpu_to_le32(RISC_WRITE|
                                                    sg_dma_len(sg));
                                *(rp++) = cpu_to_le32(sg_dma_address(sg));
                                *(rp++) = cpu_to_le32(0); /* bits 63-32 */
                                todo -= sg_dma_len(sg);
 -                              sg++;
 +                              sg = sg_next(sg);
                        }
                        *(rp++) = cpu_to_le32(RISC_WRITE|RISC_EOL|todo);
                        *(rp++) = cpu_to_le32(sg_dma_address(sg));
@@@ -2049,11 -2049,11 +2049,11 @@@ static void cx23885_finidev(struct pci_
  
        cx23885_shutdown(dev);
  
-       pci_disable_device(pci_dev);
        /* unregister stuff */
        free_irq(pci_dev->irq, dev);
  
+       pci_disable_device(pci_dev);
        cx23885_dev_unregister(dev);
        vb2_dma_sg_cleanup_ctx(dev->alloc_ctx);
        v4l2_ctrl_handler_free(&dev->ctrl_handler);
@@@ -760,8 -760,9 +760,9 @@@ static int isi_camera_querycap(struct s
  {
        strcpy(cap->driver, "atmel-isi");
        strcpy(cap->card, "Atmel Image Sensor Interface");
-       cap->capabilities = (V4L2_CAP_VIDEO_CAPTURE |
-                               V4L2_CAP_STREAMING);
+       cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
+       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
  }
  
@@@ -1068,6 -1069,7 +1069,6 @@@ static struct platform_driver atmel_isi
        .remove         = atmel_isi_remove,
        .driver         = {
                .name = "atmel_isi",
 -              .owner = THIS_MODULE,
                .of_match_table = of_match_ptr(atmel_isi_of_match),
        },
  };
@@@ -967,7 -967,8 +967,8 @@@ static int mx3_camera_querycap(struct s
  {
        /* cap->name is set by the firendly caller:-> */
        strlcpy(cap->card, "i.MX3x Camera", sizeof(cap->card));
-       cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
+       cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
+       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
  
        return 0;
  }
@@@ -1253,6 -1254,7 +1254,6 @@@ static int mx3_camera_remove(struct pla
  static struct platform_driver mx3_camera_driver = {
        .driver         = {
                .name   = MX3_CAM_DRV_NAME,
 -              .owner  = THIS_MODULE,
        },
        .probe          = mx3_camera_probe,
        .remove         = mx3_camera_remove,
@@@ -1799,7 -1799,9 +1799,9 @@@ static int rcar_vin_querycap(struct soc
                             struct v4l2_capability *cap)
  {
        strlcpy(cap->card, "R_Car_VIN", sizeof(cap->card));
-       cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
+       cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
+       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
  }
  
@@@ -1987,6 -1989,7 +1989,6 @@@ static struct platform_driver rcar_vin_
        .remove         = rcar_vin_remove,
        .driver         = {
                .name           = DRV_NAME,
 -              .owner          = THIS_MODULE,
                .of_match_table = of_match_ptr(rcar_vin_of_table),
        },
        .id_table       = rcar_vin_id_table,
@@@ -1652,7 -1652,9 +1652,9 @@@ static int sh_mobile_ceu_querycap(struc
                                  struct v4l2_capability *cap)
  {
        strlcpy(cap->card, "SuperH_Mobile_CEU", sizeof(cap->card));
-       cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
+       cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
+       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
  }
  
@@@ -2009,6 -2011,7 +2011,6 @@@ MODULE_DEVICE_TABLE(of, sh_mobile_ceu_o
  static struct platform_driver sh_mobile_ceu_driver = {
        .driver         = {
                .name   = "sh_mobile_ceu",
 -              .owner  = THIS_MODULE,
                .pm     = &sh_mobile_ceu_dev_pm_ops,
                .of_match_table = sh_mobile_ceu_of_match,
        },