The patch number 8791 was added via Hans Verkuil <[EMAIL PROTECTED]>
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:
        [EMAIL PROTECTED]

------

From: Hans Verkuil  <[EMAIL PROTECTED]>
v4l2-dev: do not clear the driver_data field


The driver_data field of the device structure was zeroed, thus losing
this information. Many drivers set this up before calling
video_device_register, so we have to ensure that it isn't lost.

Priority: normal

Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/v4l2-dev.c |    4 ++++
 1 file changed, 4 insertions(+)

diff -r bb594656b7cb -r 277e92473efa linux/drivers/media/video/v4l2-dev.c
--- a/linux/drivers/media/video/v4l2-dev.c      Sun Aug 24 13:34:15 2008 +0200
+++ b/linux/drivers/media/video/v4l2-dev.c      Sun Aug 24 16:18:47 2008 +0200
@@ -266,6 +266,7 @@ int video_register_device_index(struct v
        int end;
        int ret;
        char *name_base;
+       void *priv = video_get_drvdata(vfd);
 
        /* the release callback MUST be present */
        BUG_ON(!vfd->release);
@@ -332,6 +333,9 @@ int video_register_device_index(struct v
 
        /* sysfs class */
        memset(&vfd->dev, 0, sizeof(vfd->dev));
+       /* The memset above cleared the device's drvdata, so
+          put back the copy we made earlier. */
+       video_set_drvdata(vfd, priv);
        vfd->dev.class = &video_class;
        vfd->dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/277e92473efa811fc3f5dcba82146bee65b6ccb9

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

Reply via email to