The patch number 13346 was added via Mauro Carvalho Chehab <mche...@redhat.com>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <linux-me...@vger.kernel.org>

------

From: Mauro Carvalho Chehab  <mche...@redhat.com>
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb


Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>


---

 linux/drivers/media/video/mx1_camera.c           |    1 
 linux/drivers/media/video/mx3_camera.c           |    1 
 linux/drivers/media/video/sh_mobile_ceu_camera.c |    6 ++++-
 linux/drivers/media/video/soc_camera.c           |   17 ++++++++++-----
 linux/drivers/media/video/videobuf-dma-contig.c  |    1 
 5 files changed, 20 insertions(+), 6 deletions(-)

diff -r 0076f0714e34 -r 859534a27a3a linux/drivers/media/video/mx1_camera.c
--- a/linux/drivers/media/video/mx1_camera.c    Tue Nov 17 19:10:55 2009 -0200
+++ b/linux/drivers/media/video/mx1_camera.c    Tue Nov 17 20:18:22 2009 -0200
@@ -28,6 +28,7 @@
 #include <linux/moduleparam.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
+#include <linux/sched.h>
 #include <linux/time.h>
 #include <linux/version.h>
 #include <linux/videodev2.h>
diff -r 0076f0714e34 -r 859534a27a3a linux/drivers/media/video/mx3_camera.c
--- a/linux/drivers/media/video/mx3_camera.c    Tue Nov 17 19:10:55 2009 -0200
+++ b/linux/drivers/media/video/mx3_camera.c    Tue Nov 17 20:18:22 2009 -0200
@@ -17,6 +17,7 @@
 #include <linux/clk.h>
 #include <linux/vmalloc.h>
 #include <linux/interrupt.h>
+#include <linux/sched.h>
 
 #include <media/v4l2-common.h>
 #include <media/v4l2-dev.h>
diff -r 0076f0714e34 -r 859534a27a3a 
linux/drivers/media/video/sh_mobile_ceu_camera.c
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c  Tue Nov 17 19:10:55 
2009 -0200
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c  Tue Nov 17 20:18:22 
2009 -0200
@@ -31,6 +31,7 @@
 #include <linux/platform_device.h>
 #include <linux/videodev2.h>
 #include <linux/pm_runtime.h>
+#include <linux/sched.h>
 
 #include <media/v4l2-common.h>
 #include <media/v4l2-dev.h>
@@ -1779,10 +1780,12 @@
 
        err = soc_camera_host_register(&pcdev->ici);
        if (err)
-               goto exit_free_irq;
+               goto exit_free_clk;
 
        return 0;
 
+exit_free_clk:
+       pm_runtime_disable(&pdev->dev);
 exit_free_irq:
        free_irq(pcdev->irq, pcdev);
 exit_release_mem:
@@ -1803,6 +1806,7 @@
                                        struct sh_mobile_ceu_dev, ici);
 
        soc_camera_host_unregister(soc_host);
+       pm_runtime_disable(&pdev->dev);
        free_irq(pcdev->irq, pcdev);
        if (platform_get_resource(pdev, IORESOURCE_MEM, 1))
                dma_release_declared_memory(&pdev->dev);
diff -r 0076f0714e34 -r 859534a27a3a linux/drivers/media/video/soc_camera.c
--- a/linux/drivers/media/video/soc_camera.c    Tue Nov 17 19:10:55 2009 -0200
+++ b/linux/drivers/media/video/soc_camera.c    Tue Nov 17 20:18:22 2009 -0200
@@ -1098,6 +1098,13 @@
        return v4l2_subdev_call(sd, video, s_crop, a);
 }
 
+static void soc_camera_device_init(struct device *dev, void *pdata)
+{
+       dev->platform_data      = pdata;
+       dev->bus                = &soc_camera_bus_type;
+       dev->release            = dummy_release;
+}
+
 int soc_camera_host_register(struct soc_camera_host *ici)
 {
        struct soc_camera_host *ix;
@@ -1159,6 +1166,7 @@
 
        list_for_each_entry(icd, &devices, list) {
                if (icd->iface == ici->nr) {
+                       void *pdata = icd->dev.platform_data;
                        /* The bus->remove will be called */
                        device_unregister(&icd->dev);
                        /*
@@ -1170,6 +1178,7 @@
                         * device private data.
                         */
                        memset(&icd->dev, 0, sizeof(icd->dev));
+                       soc_camera_device_init(&icd->dev, pdata);
                }
        }
 
@@ -1201,10 +1210,7 @@
                 * man, stay reasonable... */
                return -ENOMEM;
 
-       icd->devnum = num;
-       icd->dev.bus = &soc_camera_bus_type;
-
-       icd->dev.release        = dummy_release;
+       icd->devnum             = num;
        icd->use_count          = 0;
        icd->host_priv          = NULL;
        mutex_init(&icd->video_lock);
@@ -1312,12 +1318,13 @@
        icd->iface = icl->bus_id;
        icd->pdev = &pdev->dev;
        platform_set_drvdata(pdev, icd);
-       icd->dev.platform_data = icl;
 
        ret = soc_camera_device_register(icd);
        if (ret < 0)
                goto escdevreg;
 
+       soc_camera_device_init(&icd->dev, icl);
+
        icd->user_width         = DEFAULT_WIDTH;
        icd->user_height        = DEFAULT_HEIGHT;
 
diff -r 0076f0714e34 -r 859534a27a3a 
linux/drivers/media/video/videobuf-dma-contig.c
--- a/linux/drivers/media/video/videobuf-dma-contig.c   Tue Nov 17 19:10:55 
2009 -0200
+++ b/linux/drivers/media/video/videobuf-dma-contig.c   Tue Nov 17 20:18:22 
2009 -0200
@@ -19,6 +19,7 @@
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #include <linux/dma-mapping.h>
+#include <linux/sched.h>
 #include <media/videobuf-dma-contig.h>
 #include "compat.h"
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/859534a27a3a69e48f498c25006899caeeeca7de

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to