summaryrefslogtreecommitdiffstats
path: root/source.local/k/sources/patches/exynos5/remove_flags_member.patch
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2013-04-16 12:45:23 +0200
committer Eric Hameleers <alien@slackware.com>2013-04-16 12:45:23 +0200
commitc8eba004d3e24772130c1483733a71061e890399 (patch)
treec84da6878b71bd4329dfa145583f06e4547aaed1 /source.local/k/sources/patches/exynos5/remove_flags_member.patch
parent16c06bbd42b8da955ae3b25e77ffff4d3f8f853c (diff)
downloadalienarm-c8eba004d3e24772130c1483733a71061e890399.tar.gz
alienarm-c8eba004d3e24772130c1483733a71061e890399.tar.xz
Exynos5: build ChromeOS kernel for Samsung ChromeBook (exynos5 CPU)
Sources in k/ have been updated and new d/device-tree-compiler sources have been added to allow compiling the ChromeOS kernel for the Samsung ChromeBook (with an Exynos5 CPU). Kernel sources are checked out of the chromium git repository,
Diffstat (limited to '')
-rw-r--r--source.local/k/sources/patches/exynos5/remove_flags_member.patch471
1 files changed, 471 insertions, 0 deletions
diff --git a/source.local/k/sources/patches/exynos5/remove_flags_member.patch b/source.local/k/sources/patches/exynos5/remove_flags_member.patch
new file mode 100644
index 0000000..0046f26
--- /dev/null
+++ b/source.local/k/sources/patches/exynos5/remove_flags_member.patch
@@ -0,0 +1,471 @@
+# Reverting this commit:
+# http://git.chromium.org/gitweb/?p=chromiumos/third_party/kernel.git;a=patch;h=42f2b4fff5b2d3ad471bfdf805385616f506de75
+# To avoid an error like:
+# drivers/media/video/cpia2/cpia2_v4l.c:1467:2: error: request for member 'flags' in something not a structure or union
+#
+
+diff -uar linux-3.4.orig/drivers/media/common/saa7146_fops.c linux-3.4/drivers/media/common/saa7146_fops.c
+--- linux-3.4.orig/drivers/media/common/saa7146_fops.c 2013-04-14 21:13:43.696149818 +0200
++++ linux-3.4/drivers/media/common/saa7146_fops.c 2013-04-15 00:43:29.071858254 +0200
+@@ -511,10 +511,6 @@
+ vfd->fops = &video_fops;
+ vfd->ioctl_ops = &dev->ext_vv_data->ops;
+ vfd->release = video_device_release;
+- /* Locking in file operations other than ioctl should be done by
+- the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+ vfd->lock = &dev->v4l2_lock;
+ vfd->tvnorms = 0;
+ for (i = 0; i < dev->ext_vv_data->num_stds; i++)
+diff -uar linux-3.4.orig/drivers/media/radio/wl128x/fmdrv_v4l2.c linux-3.4/drivers/media/radio/wl128x/fmdrv_v4l2.c
+--- linux-3.4.orig/drivers/media/radio/wl128x/fmdrv_v4l2.c 2013-04-14 21:13:43.774137100 +0200
++++ linux-3.4/drivers/media/radio/wl128x/fmdrv_v4l2.c 2013-04-15 00:43:29.071858254 +0200
+@@ -518,10 +518,6 @@
+ video_set_drvdata(gradio_dev, fmdev);
+
+ gradio_dev->lock = &fmdev->mutex;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &gradio_dev->flags);
+
+ /* Register with V4L2 subsystem as RADIO device */
+ if (video_register_device(gradio_dev, VFL_TYPE_RADIO, radio_nr)) {
+diff -uar linux-3.4.orig/drivers/media/video/blackfin/bfin_capture.c linux-3.4/drivers/media/video/blackfin/bfin_capture.c
+--- linux-3.4.orig/drivers/media/video/blackfin/bfin_capture.c 2013-04-14 21:13:43.785135307 +0200
++++ linux-3.4/drivers/media/video/blackfin/bfin_capture.c 2013-04-15 00:43:29.086855805 +0200
+@@ -942,10 +942,6 @@
+ INIT_LIST_HEAD(&bcap_dev->dma_queue);
+
+ vfd->lock = &bcap_dev->mutex;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+
+ /* register video device */
+ ret = video_register_device(bcap_dev->video_dev, VFL_TYPE_GRABBER, -1);
+diff -uar linux-3.4.orig/drivers/media/video/cpia2/cpia2_v4l.c linux-3.4/drivers/media/video/cpia2/cpia2_v4l.c
+--- linux-3.4.orig/drivers/media/video/cpia2/cpia2_v4l.c 2013-04-14 21:13:43.790134492 +0200
++++ linux-3.4/drivers/media/video/cpia2/cpia2_v4l.c 2013-04-15 00:43:29.094854499 +0200
+@@ -1461,10 +1461,6 @@
+ memcpy(cam->vdev, &cpia2_template, sizeof(cpia2_template));
+ video_set_drvdata(cam->vdev, cam);
+ cam->vdev->lock = &cam->v4l2_lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &cam->vdev.flags);
+
+ reset_camera_struct_v4l(cam);
+
+diff -uar linux-3.4.orig/drivers/media/video/cx231xx/cx231xx-video.c linux-3.4/drivers/media/video/cx231xx/cx231xx-video.c
+--- linux-3.4.orig/drivers/media/video/cx231xx/cx231xx-video.c 2013-04-14 21:13:43.799133025 +0200
++++ linux-3.4/drivers/media/video/cx231xx/cx231xx-video.c 2013-04-15 00:43:29.105852704 +0200
+@@ -2561,10 +2561,6 @@
+ vfd->release = video_device_release;
+ vfd->debug = video_debug;
+ vfd->lock = &dev->lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+
+ snprintf(vfd->name, sizeof(vfd->name), "%s %s", dev->name, type_name);
+
+diff -uar linux-3.4.orig/drivers/media/video/davinci/vpbe_display.c linux-3.4/drivers/media/video/davinci/vpbe_display.c
+--- linux-3.4.orig/drivers/media/video/davinci/vpbe_display.c 2013-04-14 21:13:43.812130906 +0200
++++ linux-3.4/drivers/media/video/davinci/vpbe_display.c 2013-04-15 00:43:29.112851561 +0200
+@@ -1618,10 +1618,6 @@
+ vbd->ioctl_ops = &vpbe_ioctl_ops;
+ vbd->minor = -1;
+ vbd->v4l2_dev = &disp_dev->vpbe_dev->v4l2_dev;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vbd->flags);
+ vbd->lock = &vpbe_display_layer->opslock;
+
+ if (disp_dev->vpbe_dev->current_timings.timings_type &
+diff -uar linux-3.4.orig/drivers/media/video/davinci/vpif_capture.c linux-3.4/drivers/media/video/davinci/vpif_capture.c
+--- linux-3.4.orig/drivers/media/video/davinci/vpif_capture.c 2013-04-14 21:13:43.814130580 +0200
++++ linux-3.4/drivers/media/video/davinci/vpif_capture.c 2013-04-15 00:43:29.115851072 +0200
+@@ -2228,10 +2228,6 @@
+ common = &(ch->common[VPIF_VIDEO_INDEX]);
+ spin_lock_init(&common->irqlock);
+ mutex_init(&common->lock);
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &ch->video_dev->flags);
+ ch->video_dev->lock = &common->lock;
+ /* Initialize prio member of channel object */
+ v4l2_prio_init(&ch->prio);
+diff -uar linux-3.4.orig/drivers/media/video/davinci/vpif_display.c linux-3.4/drivers/media/video/davinci/vpif_display.c
+--- linux-3.4.orig/drivers/media/video/davinci/vpif_display.c 2013-04-14 21:13:43.814130580 +0200
++++ linux-3.4/drivers/media/video/davinci/vpif_display.c 2013-04-15 00:43:29.116850909 +0200
+@@ -1778,10 +1778,6 @@
+ v4l2_prio_init(&ch->prio);
+ ch->common[VPIF_VIDEO_INDEX].fmt.type =
+ V4L2_BUF_TYPE_VIDEO_OUTPUT;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &ch->video_dev->flags);
+ ch->video_dev->lock = &common->lock;
+
+ /* register video device */
+diff -uar linux-3.4.orig/drivers/media/video/em28xx/em28xx-video.c linux-3.4/drivers/media/video/em28xx/em28xx-video.c
+--- linux-3.4.orig/drivers/media/video/em28xx/em28xx-video.c 2013-04-14 21:13:43.816130254 +0200
++++ linux-3.4/drivers/media/video/em28xx/em28xx-video.c 2013-04-15 00:43:29.120850255 +0200
+@@ -2497,10 +2497,6 @@
+ vfd->release = video_device_release;
+ vfd->debug = video_debug;
+ vfd->lock = &dev->lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+
+ snprintf(vfd->name, sizeof(vfd->name), "%s %s",
+ dev->name, type_name);
+diff -uar linux-3.4.orig/drivers/media/video/fsl-viu.c linux-3.4/drivers/media/video/fsl-viu.c
+--- linux-3.4.orig/drivers/media/video/fsl-viu.c 2013-04-14 21:13:43.821129437 +0200
++++ linux-3.4/drivers/media/video/fsl-viu.c 2013-04-15 00:43:29.126849277 +0200
+@@ -1544,10 +1544,6 @@
+
+ /* initialize locks */
+ mutex_init(&viu_dev->lock);
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &viu_dev->vdev->flags);
+ viu_dev->vdev->lock = &viu_dev->lock;
+ spin_lock_init(&viu_dev->slock);
+
+diff -uar linux-3.4.orig/drivers/media/video/ivtv/ivtv-streams.c linux-3.4/drivers/media/video/ivtv/ivtv-streams.c
+--- linux-3.4.orig/drivers/media/video/ivtv/ivtv-streams.c 2013-04-14 21:13:43.845125525 +0200
++++ linux-3.4/drivers/media/video/ivtv/ivtv-streams.c 2013-04-15 00:43:29.127849113 +0200
+@@ -228,10 +228,6 @@
+ s->vdev->release = video_device_release;
+ s->vdev->tvnorms = V4L2_STD_ALL;
+ s->vdev->lock = &itv->serialize_lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &s->vdev->flags);
+ set_bit(V4L2_FL_USE_FH_PRIO, &s->vdev->flags);
+ ivtv_set_funcs(s->vdev);
+ return 0;
+diff -uar linux-3.4.orig/drivers/media/video/mem2mem_testdev.c linux-3.4/drivers/media/video/mem2mem_testdev.c
+--- linux-3.4.orig/drivers/media/video/mem2mem_testdev.c 2013-04-14 21:13:43.848125036 +0200
++++ linux-3.4/drivers/media/video/mem2mem_testdev.c 2013-04-15 00:43:29.139847154 +0200
+@@ -958,10 +958,6 @@
+ }
+
+ *vfd = m2mtest_videodev;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+ vfd->lock = &dev->dev_mutex;
+
+ ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
+diff -uar linux-3.4.orig/drivers/media/video/mx2_emmaprp.c linux-3.4/drivers/media/video/mx2_emmaprp.c
+--- linux-3.4.orig/drivers/media/video/mx2_emmaprp.c 2013-04-14 21:13:43.852124384 +0200
++++ linux-3.4/drivers/media/video/mx2_emmaprp.c 2013-04-15 00:43:29.143846502 +0200
+@@ -904,10 +904,6 @@
+ }
+
+ *vfd = emmaprp_videodev;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+ vfd->lock = &pcdev->dev_mutex;
+
+ video_set_drvdata(vfd, pcdev);
+diff -uar linux-3.4.orig/drivers/media/video/s2255drv.c linux-3.4/drivers/media/video/s2255drv.c
+--- linux-3.4.orig/drivers/media/video/s2255drv.c 2013-04-14 21:13:43.866122102 +0200
++++ linux-3.4/drivers/media/video/s2255drv.c 2013-04-15 00:43:29.153844869 +0200
+@@ -1949,10 +1949,6 @@
+ /* register 4 video devices */
+ channel->vdev = template;
+ channel->vdev.lock = &dev->lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &channel->vdev.flags);
+ channel->vdev.v4l2_dev = &dev->v4l2_dev;
+ video_set_drvdata(&channel->vdev, channel);
+ if (video_nr == -1)
+diff -uar linux-3.4.orig/drivers/media/video/s5p-fimc/fimc-capture.c linux-3.4/drivers/media/video/s5p-fimc/fimc-capture.c
+--- linux-3.4.orig/drivers/media/video/s5p-fimc/fimc-capture.c 2013-04-14 21:13:43.867121939 +0200
++++ linux-3.4/drivers/media/video/s5p-fimc/fimc-capture.c 2013-04-15 00:43:29.155844542 +0200
+@@ -1532,10 +1532,6 @@
+ vfd->minor = -1;
+ vfd->release = video_device_release;
+ vfd->lock = &fimc->lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+ video_set_drvdata(vfd, fimc);
+
+ vid_cap = &fimc->vid_cap;
+diff -uar linux-3.4.orig/drivers/media/video/s5p-fimc/fimc-core.c linux-3.4/drivers/media/video/s5p-fimc/fimc-core.c
+--- linux-3.4.orig/drivers/media/video/s5p-fimc/fimc-core.c 2013-04-14 21:13:43.867121939 +0200
++++ linux-3.4/drivers/media/video/s5p-fimc/fimc-core.c 2013-04-15 00:43:29.156844379 +0200
+@@ -1562,10 +1562,6 @@
+ vfd->minor = -1;
+ vfd->release = video_device_release;
+ vfd->lock = &fimc->lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+
+ snprintf(vfd->name, sizeof(vfd->name), "%s.m2m", dev_name(&pdev->dev));
+ video_set_drvdata(vfd, fimc);
+diff -uar linux-3.4.orig/drivers/media/video/s5p-g2d/g2d.c linux-3.4/drivers/media/video/s5p-g2d/g2d.c
+--- linux-3.4.orig/drivers/media/video/s5p-g2d/g2d.c 2013-04-14 21:13:43.868121776 +0200
++++ linux-3.4/drivers/media/video/s5p-g2d/g2d.c 2013-04-15 00:43:29.157844216 +0200
+@@ -762,10 +762,6 @@
+ goto unreg_v4l2_dev;
+ }
+ *vfd = g2d_videodev;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+ vfd->lock = &dev->mutex;
+ ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
+ if (ret) {
+diff -uar linux-3.4.orig/drivers/media/video/s5p-jpeg/jpeg-core.c linux-3.4/drivers/media/video/s5p-jpeg/jpeg-core.c
+--- linux-3.4.orig/drivers/media/video/s5p-jpeg/jpeg-core.c 2013-04-14 21:13:43.868121776 +0200
++++ linux-3.4/drivers/media/video/s5p-jpeg/jpeg-core.c 2013-04-15 00:43:29.163843236 +0200
+@@ -1386,10 +1386,6 @@
+ jpeg->vfd_encoder->release = video_device_release;
+ jpeg->vfd_encoder->lock = &jpeg->lock;
+ jpeg->vfd_encoder->v4l2_dev = &jpeg->v4l2_dev;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &jpeg->vfd_encoder->flags);
+
+ ret = video_register_device(jpeg->vfd_encoder, VFL_TYPE_GRABBER, -1);
+ if (ret) {
+@@ -1417,10 +1413,6 @@
+ jpeg->vfd_decoder->release = video_device_release;
+ jpeg->vfd_decoder->lock = &jpeg->lock;
+ jpeg->vfd_decoder->v4l2_dev = &jpeg->v4l2_dev;
+- /* Locking in file operations other than ioctl should be done by the driver,
+- not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &jpeg->vfd_decoder->flags);
+
+ ret = video_register_device(jpeg->vfd_decoder, VFL_TYPE_GRABBER, -1);
+ if (ret) {
+diff -uar linux-3.4.orig/drivers/media/video/s5p-tv/mixer_video.c linux-3.4/drivers/media/video/s5p-tv/mixer_video.c
+--- linux-3.4.orig/drivers/media/video/s5p-tv/mixer_video.c 2013-04-14 21:13:43.872121122 +0200
++++ linux-3.4/drivers/media/video/s5p-tv/mixer_video.c 2013-04-15 00:43:29.172841767 +0200
+@@ -1079,10 +1079,6 @@
+ set_bit(V4L2_FL_USE_FH_PRIO, &layer->vfd.flags);
+
+ video_set_drvdata(&layer->vfd, layer);
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &layer->vfd.flags);
+ layer->vfd.lock = &layer->mutex;
+ layer->vfd.v4l2_dev = &mdev->v4l2_dev;
+
+diff -uar linux-3.4.orig/drivers/media/video/sh_vou.c linux-3.4/drivers/media/video/sh_vou.c
+--- linux-3.4.orig/drivers/media/video/sh_vou.c 2013-04-14 21:13:43.881119655 +0200
++++ linux-3.4/drivers/media/video/sh_vou.c 2013-04-15 00:43:29.184839809 +0200
+@@ -1390,10 +1390,6 @@
+ vdev->v4l2_dev = &vou_dev->v4l2_dev;
+ vdev->release = video_device_release;
+ vdev->lock = &vou_dev->fop_lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags);
+
+ vou_dev->vdev = vdev;
+ video_set_drvdata(vdev, vou_dev);
+diff -uar linux-3.4.orig/drivers/media/video/soc_camera.c linux-3.4/drivers/media/video/soc_camera.c
+--- linux-3.4.orig/drivers/media/video/soc_camera.c 2013-04-14 21:13:43.882119492 +0200
++++ linux-3.4/drivers/media/video/soc_camera.c 2013-04-15 00:43:29.199837360 +0200
+@@ -1429,10 +1429,6 @@
+ vdev->tvnorms = V4L2_STD_UNKNOWN;
+ vdev->ctrl_handler = &icd->ctrl_handler;
+ vdev->lock = &icd->video_lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags);
+
+ icd->vdev = vdev;
+
+diff -uar linux-3.4.orig/drivers/media/video/tm6000/tm6000-video.c linux-3.4/drivers/media/video/tm6000/tm6000-video.c
+--- linux-3.4.orig/drivers/media/video/tm6000/tm6000-video.c 2013-04-14 21:13:43.886118840 +0200
++++ linux-3.4/drivers/media/video/tm6000/tm6000-video.c 2013-04-15 00:43:29.214834911 +0200
+@@ -1732,10 +1732,6 @@
+ vfd->release = video_device_release;
+ vfd->debug = tm6000_debug;
+ vfd->lock = &dev->lock;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vfd->flags);
+
+ snprintf(vfd->name, sizeof(vfd->name), "%s %s", dev->name, type_name);
+
+diff -uar linux-3.4.orig/drivers/media/video/usbvision/usbvision-video.c linux-3.4/drivers/media/video/usbvision/usbvision-video.c
+--- linux-3.4.orig/drivers/media/video/usbvision/usbvision-video.c 2013-04-14 21:13:43.891118025 +0200
++++ linux-3.4/drivers/media/video/usbvision/usbvision-video.c 2013-04-15 00:43:29.218834259 +0200
+@@ -1296,10 +1296,6 @@
+ if (NULL == vdev)
+ return NULL;
+ *vdev = *vdev_template;
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags);
+ vdev->lock = &usbvision->v4l2_lock;
+ vdev->v4l2_dev = &usbvision->v4l2_dev;
+ snprintf(vdev->name, sizeof(vdev->name), "%s", name);
+diff -uar linux-3.4.orig/drivers/media/video/v4l2-dev.c linux-3.4/drivers/media/video/v4l2-dev.c
+--- linux-3.4.orig/drivers/media/video/v4l2-dev.c 2013-04-14 21:13:43.894117536 +0200
++++ linux-3.4/drivers/media/video/v4l2-dev.c 2013-04-15 00:43:29.225833116 +0200
+@@ -274,12 +274,11 @@
+
+ if (!vdev->fops->read)
+ return -EINVAL;
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags) &&
+- mutex_lock_interruptible(vdev->lock))
++ if (vdev->lock && mutex_lock_interruptible(vdev->lock))
+ return -ERESTARTSYS;
+ if (video_is_registered(vdev))
+ ret = vdev->fops->read(filp, buf, sz, off);
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags))
++ if (vdev->lock)
+ mutex_unlock(vdev->lock);
+ return ret;
+ }
+@@ -292,12 +291,11 @@
+
+ if (!vdev->fops->write)
+ return -EINVAL;
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags) &&
+- mutex_lock_interruptible(vdev->lock))
++ if (vdev->lock && mutex_lock_interruptible(vdev->lock))
+ return -ERESTARTSYS;
+ if (video_is_registered(vdev))
+ ret = vdev->fops->write(filp, buf, sz, off);
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags))
++ if (vdev->lock)
+ mutex_unlock(vdev->lock);
+ return ret;
+ }
+@@ -309,11 +307,11 @@
+
+ if (!vdev->fops->poll)
+ return DEFAULT_POLLMASK;
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags))
++ if (vdev->lock)
+ mutex_lock(vdev->lock);
+ if (video_is_registered(vdev))
+ ret = vdev->fops->poll(filp, poll);
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags))
++ if (vdev->lock)
+ mutex_unlock(vdev->lock);
+ return ret;
+ }
+@@ -401,12 +399,11 @@
+
+ if (!vdev->fops->mmap)
+ return ret;
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags) &&
+- mutex_lock_interruptible(vdev->lock))
++ if (vdev->lock && mutex_lock_interruptible(vdev->lock))
+ return -ERESTARTSYS;
+ if (video_is_registered(vdev))
+ ret = vdev->fops->mmap(filp, vm);
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags))
++ if (vdev->lock)
+ mutex_unlock(vdev->lock);
+ return ret;
+ }
+@@ -429,8 +426,7 @@
+ video_get(vdev);
+ mutex_unlock(&videodev_lock);
+ if (vdev->fops->open) {
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags) &&
+- mutex_lock_interruptible(vdev->lock)) {
++ if (vdev->lock && mutex_lock_interruptible(vdev->lock)) {
+ ret = -ERESTARTSYS;
+ goto err;
+ }
+@@ -438,7 +434,7 @@
+ ret = vdev->fops->open(filp);
+ else
+ ret = -ENODEV;
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags))
++ if (vdev->lock)
+ mutex_unlock(vdev->lock);
+ }
+
+@@ -456,10 +452,10 @@
+ int ret = 0;
+
+ if (vdev->fops->release) {
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags))
++ if (vdev->lock)
+ mutex_lock(vdev->lock);
+ vdev->fops->release(filp);
+- if (test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags))
++ if (vdev->lock)
+ mutex_unlock(vdev->lock);
+ }
+ /* decrease the refcount unconditionally since the release()
+@@ -836,10 +832,6 @@
+ WARN_ON(video_device[vdev->minor] != NULL);
+ vdev->index = get_index(vdev);
+ mutex_unlock(&videodev_lock);
+- /* if no lock was passed, then make sure the LOCK_ALL_FOPS bit is
+- clear and warn if it wasn't. */
+- if (vdev->lock == NULL)
+- WARN_ON(test_and_clear_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags));
+
+ if (vdev->ioctl_ops)
+ determine_valid_ioctls(vdev);
+diff -uar linux-3.4.orig/drivers/staging/media/dt3155v4l/dt3155v4l.c linux-3.4/drivers/staging/media/dt3155v4l/dt3155v4l.c
+--- linux-3.4.orig/drivers/staging/media/dt3155v4l/dt3155v4l.c 2013-04-14 21:13:44.848961835 +0200
++++ linux-3.4/drivers/staging/media/dt3155v4l/dt3155v4l.c 2013-04-15 00:43:29.230832299 +0200
+@@ -898,10 +898,6 @@
+ INIT_LIST_HEAD(&pd->dmaq);
+ mutex_init(&pd->mux);
+ pd->vdev->lock = &pd->mux; /* for locking v4l2_file_operations */
+- /* Locking in file operations other than ioctl should be done
+- by the driver, not the V4L2 core.
+- This driver needs auditing so that this flag can be removed. */
+- set_bit(V4L2_FL_LOCK_ALL_FOPS, &pd->vdev->flags);
+ spin_lock_init(&pd->lock);
+ pd->csr2 = csr2_init;
+ pd->config = config_init;
+diff -uar linux-3.4.orig/include/media/v4l2-dev.h linux-3.4/include/media/v4l2-dev.h
+--- linux-3.4.orig/include/media/v4l2-dev.h 2013-04-14 21:13:45.663828958 +0200
++++ linux-3.4/include/media/v4l2-dev.h 2013-04-15 00:43:29.230832299 +0200
+@@ -39,9 +39,6 @@
+ #define V4L2_FL_USES_V4L2_FH (1)
+ /* Use the prio field of v4l2_fh for core priority checking */
+ #define V4L2_FL_USE_FH_PRIO (2)
+-/* If ioctl core locking is in use, then apply that also to all
+- file operations. */
+-#define V4L2_FL_LOCK_ALL_FOPS (3)
+
+ /* Priority helper functions */
+