aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-core/dmxdev.c3
-rw-r--r--drivers/media/dvb/dvb-core/dvb_demux.c1
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.c1
-rw-r--r--drivers/media/dvb/firewire/firedtv-ci.c2
-rw-r--r--drivers/media/radio/radio-cadet.c1
-rw-r--r--drivers/media/video/cafe_ccic.c2
-rw-r--r--drivers/media/video/cpia.c1
-rw-r--r--drivers/media/video/et61x251/et61x251_core.c2
-rw-r--r--drivers/media/video/gspca/gspca.c2
-rw-r--r--drivers/media/video/meye.c3
-rw-r--r--drivers/media/video/sh_mobile_ceu_camera.c4
-rw-r--r--drivers/media/video/sn9c102/sn9c102_core.c2
-rw-r--r--drivers/media/video/stk-webcam.c2
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c2
-rw-r--r--drivers/media/video/videobuf-core.c1
-rw-r--r--drivers/media/video/videobuf-dma-contig.c2
-rw-r--r--drivers/media/video/videobuf-dma-sg.c3
-rw-r--r--drivers/media/video/videobuf-vmalloc.c2
-rw-r--r--drivers/media/video/vino.c2
-rw-r--r--drivers/media/video/zc0301/zc0301_core.c2
-rw-r--r--drivers/media/video/zoran/zoran_driver.c2
21 files changed, 25 insertions, 17 deletions
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
index 3750ff48cba..c37790ad92d 100644
--- a/drivers/media/dvb/dvb-core/dmxdev.c
+++ b/drivers/media/dvb/dvb-core/dmxdev.c
@@ -20,6 +20,7 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/sched.h>
23#include <linux/spinlock.h> 24#include <linux/spinlock.h>
24#include <linux/slab.h> 25#include <linux/slab.h>
25#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
@@ -1203,7 +1204,7 @@ static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
1203 return mask; 1204 return mask;
1204} 1205}
1205 1206
1206static struct file_operations dvb_dvr_fops = { 1207static const struct file_operations dvb_dvr_fops = {
1207 .owner = THIS_MODULE, 1208 .owner = THIS_MODULE,
1208 .read = dvb_dvr_read, 1209 .read = dvb_dvr_read,
1209 .write = dvb_dvr_write, 1210 .write = dvb_dvr_write,
diff --git a/drivers/media/dvb/dvb-core/dvb_demux.c b/drivers/media/dvb/dvb-core/dvb_demux.c
index eef6d361662..91c537bca8a 100644
--- a/drivers/media/dvb/dvb-core/dvb_demux.c
+++ b/drivers/media/dvb/dvb-core/dvb_demux.c
@@ -21,6 +21,7 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/sched.h>
24#include <linux/spinlock.h> 25#include <linux/spinlock.h>
25#include <linux/slab.h> 26#include <linux/slab.h>
26#include <linux/vmalloc.h> 27#include <linux/vmalloc.h>
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index 8c9ae0a3a27..0241a7c5c34 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -63,6 +63,7 @@
63#include <asm/uaccess.h> 63#include <asm/uaccess.h>
64#include <linux/crc32.h> 64#include <linux/crc32.h>
65#include <linux/mutex.h> 65#include <linux/mutex.h>
66#include <linux/sched.h>
66 67
67#include "dvb_demux.h" 68#include "dvb_demux.h"
68#include "dvb_net.h" 69#include "dvb_net.h"
diff --git a/drivers/media/dvb/firewire/firedtv-ci.c b/drivers/media/dvb/firewire/firedtv-ci.c
index eeb80d0ea3f..853e04b7cb3 100644
--- a/drivers/media/dvb/firewire/firedtv-ci.c
+++ b/drivers/media/dvb/firewire/firedtv-ci.c
@@ -215,7 +215,7 @@ static unsigned int fdtv_ca_io_poll(struct file *file, poll_table *wait)
215 return POLLIN; 215 return POLLIN;
216} 216}
217 217
218static struct file_operations fdtv_ca_fops = { 218static const struct file_operations fdtv_ca_fops = {
219 .owner = THIS_MODULE, 219 .owner = THIS_MODULE,
220 .ioctl = dvb_generic_ioctl, 220 .ioctl = dvb_generic_ioctl,
221 .open = dvb_generic_open, 221 .open = dvb_generic_open,
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
index 8b1440136c4..482d0f3be5f 100644
--- a/drivers/media/radio/radio-cadet.c
+++ b/drivers/media/radio/radio-cadet.c
@@ -38,6 +38,7 @@
38#include <linux/videodev2.h> /* V4L2 API defs */ 38#include <linux/videodev2.h> /* V4L2 API defs */
39#include <linux/param.h> 39#include <linux/param.h>
40#include <linux/pnp.h> 40#include <linux/pnp.h>
41#include <linux/sched.h>
41#include <linux/io.h> /* outb, outb_p */ 42#include <linux/io.h> /* outb, outb_p */
42#include <media/v4l2-device.h> 43#include <media/v4l2-device.h>
43#include <media/v4l2-ioctl.h> 44#include <media/v4l2-ioctl.h>
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index 657c481d255..10230cb3d21 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -1325,7 +1325,7 @@ static void cafe_v4l_vm_close(struct vm_area_struct *vma)
1325 mutex_unlock(&sbuf->cam->s_mutex); 1325 mutex_unlock(&sbuf->cam->s_mutex);
1326} 1326}
1327 1327
1328static struct vm_operations_struct cafe_v4l_vm_ops = { 1328static const struct vm_operations_struct cafe_v4l_vm_ops = {
1329 .open = cafe_v4l_vm_open, 1329 .open = cafe_v4l_vm_open,
1330 .close = cafe_v4l_vm_close 1330 .close = cafe_v4l_vm_close
1331}; 1331};
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c
index 43ab0adf3b6..2377313c041 100644
--- a/drivers/media/video/cpia.c
+++ b/drivers/media/video/cpia.c
@@ -31,6 +31,7 @@
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/fs.h> 32#include <linux/fs.h>
33#include <linux/vmalloc.h> 33#include <linux/vmalloc.h>
34#include <linux/sched.h>
34#include <linux/slab.h> 35#include <linux/slab.h>
35#include <linux/proc_fs.h> 36#include <linux/proc_fs.h>
36#include <linux/ctype.h> 37#include <linux/ctype.h>
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c
index 74092f436be..88987a57cf7 100644
--- a/drivers/media/video/et61x251/et61x251_core.c
+++ b/drivers/media/video/et61x251/et61x251_core.c
@@ -1496,7 +1496,7 @@ static void et61x251_vm_close(struct vm_area_struct* vma)
1496} 1496}
1497 1497
1498 1498
1499static struct vm_operations_struct et61x251_vm_ops = { 1499static const struct vm_operations_struct et61x251_vm_ops = {
1500 .open = et61x251_vm_open, 1500 .open = et61x251_vm_open,
1501 .close = et61x251_vm_close, 1501 .close = et61x251_vm_close,
1502}; 1502};
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index cf6540da1e4..23d3fb77691 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -99,7 +99,7 @@ static void gspca_vm_close(struct vm_area_struct *vma)
99 frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED; 99 frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED;
100} 100}
101 101
102static struct vm_operations_struct gspca_vm_ops = { 102static const struct vm_operations_struct gspca_vm_ops = {
103 .open = gspca_vm_open, 103 .open = gspca_vm_open,
104 .close = gspca_vm_close, 104 .close = gspca_vm_close,
105}; 105};
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index d0765bed79c..01e1eefcf1e 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -28,6 +28,7 @@
28 */ 28 */
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/pci.h> 30#include <linux/pci.h>
31#include <linux/sched.h>
31#include <linux/init.h> 32#include <linux/init.h>
32#include <linux/videodev.h> 33#include <linux/videodev.h>
33#include <media/v4l2-common.h> 34#include <media/v4l2-common.h>
@@ -1589,7 +1590,7 @@ static void meye_vm_close(struct vm_area_struct *vma)
1589 meye.vma_use_count[idx]--; 1590 meye.vma_use_count[idx]--;
1590} 1591}
1591 1592
1592static struct vm_operations_struct meye_vm_ops = { 1593static const struct vm_operations_struct meye_vm_ops = {
1593 .open = meye_vm_open, 1594 .open = meye_vm_open,
1594 .close = meye_vm_close, 1595 .close = meye_vm_close,
1595}; 1596};
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
index 5ab7c5aefd6..65ac474c517 100644
--- a/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/drivers/media/video/sh_mobile_ceu_camera.c
@@ -404,7 +404,7 @@ static int sh_mobile_ceu_add_device(struct soc_camera_device *icd)
404 "SuperH Mobile CEU driver attached to camera %d\n", 404 "SuperH Mobile CEU driver attached to camera %d\n",
405 icd->devnum); 405 icd->devnum);
406 406
407 clk_enable(pcdev->clk); 407 pm_runtime_get_sync(ici->v4l2_dev.dev);
408 408
409 ceu_write(pcdev, CAPSR, 1 << 16); /* reset */ 409 ceu_write(pcdev, CAPSR, 1 << 16); /* reset */
410 while (ceu_read(pcdev, CSTSR) & 1) 410 while (ceu_read(pcdev, CSTSR) & 1)
@@ -438,7 +438,7 @@ static void sh_mobile_ceu_remove_device(struct soc_camera_device *icd)
438 } 438 }
439 spin_unlock_irqrestore(&pcdev->lock, flags); 439 spin_unlock_irqrestore(&pcdev->lock, flags);
440 440
441 clk_disable(pcdev->clk); 441 pm_runtime_put_sync(ici->v4l2_dev.dev);
442 442
443 dev_info(icd->dev.parent, 443 dev_info(icd->dev.parent,
444 "SuperH Mobile CEU driver detached from camera %d\n", 444 "SuperH Mobile CEU driver detached from camera %d\n",
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index 9d84c94e8a4..4a7711c3e74 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -2077,7 +2077,7 @@ static void sn9c102_vm_close(struct vm_area_struct* vma)
2077} 2077}
2078 2078
2079 2079
2080static struct vm_operations_struct sn9c102_vm_ops = { 2080static const struct vm_operations_struct sn9c102_vm_ops = {
2081 .open = sn9c102_vm_open, 2081 .open = sn9c102_vm_open,
2082 .close = sn9c102_vm_close, 2082 .close = sn9c102_vm_close,
2083}; 2083};
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index 0b996ea4134..6b41865f42b 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -790,7 +790,7 @@ static void stk_v4l_vm_close(struct vm_area_struct *vma)
790 if (sbuf->mapcount == 0) 790 if (sbuf->mapcount == 0)
791 sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED; 791 sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED;
792} 792}
793static struct vm_operations_struct stk_v4l_vm_ops = { 793static const struct vm_operations_struct stk_v4l_vm_ops = {
794 .open = stk_v4l_vm_open, 794 .open = stk_v4l_vm_open,
795 .close = stk_v4l_vm_close 795 .close = stk_v4l_vm_close
796}; 796};
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
index 9e7351569b5..a2bdd806efa 100644
--- a/drivers/media/video/uvc/uvc_v4l2.c
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -1069,7 +1069,7 @@ static void uvc_vm_close(struct vm_area_struct *vma)
1069 buffer->vma_use_count--; 1069 buffer->vma_use_count--;
1070} 1070}
1071 1071
1072static struct vm_operations_struct uvc_vm_ops = { 1072static const struct vm_operations_struct uvc_vm_ops = {
1073 .open = uvc_vm_open, 1073 .open = uvc_vm_open,
1074 .close = uvc_vm_close, 1074 .close = uvc_vm_close,
1075}; 1075};
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index f1ccf98c0a6..8e93c6f25c8 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -17,6 +17,7 @@
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/moduleparam.h> 18#include <linux/moduleparam.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/sched.h>
20#include <linux/slab.h> 21#include <linux/slab.h>
21#include <linux/interrupt.h> 22#include <linux/interrupt.h>
22 23
diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c
index d09ce83a942..635ffc7b039 100644
--- a/drivers/media/video/videobuf-dma-contig.c
+++ b/drivers/media/video/videobuf-dma-contig.c
@@ -105,7 +105,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma)
105 } 105 }
106} 106}
107 107
108static struct vm_operations_struct videobuf_vm_ops = { 108static const struct vm_operations_struct videobuf_vm_ops = {
109 .open = videobuf_vm_open, 109 .open = videobuf_vm_open,
110 .close = videobuf_vm_close, 110 .close = videobuf_vm_close,
111}; 111};
diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
index a8dd22ace3f..032ebae0134 100644
--- a/drivers/media/video/videobuf-dma-sg.c
+++ b/drivers/media/video/videobuf-dma-sg.c
@@ -21,6 +21,7 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/moduleparam.h> 23#include <linux/moduleparam.h>
24#include <linux/sched.h>
24#include <linux/slab.h> 25#include <linux/slab.h>
25#include <linux/interrupt.h> 26#include <linux/interrupt.h>
26 27
@@ -394,7 +395,7 @@ videobuf_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
394 return 0; 395 return 0;
395} 396}
396 397
397static struct vm_operations_struct videobuf_vm_ops = 398static const struct vm_operations_struct videobuf_vm_ops =
398{ 399{
399 .open = videobuf_vm_open, 400 .open = videobuf_vm_open,
400 .close = videobuf_vm_close, 401 .close = videobuf_vm_close,
diff --git a/drivers/media/video/videobuf-vmalloc.c b/drivers/media/video/videobuf-vmalloc.c
index 30ae30f99cc..35f3900c563 100644
--- a/drivers/media/video/videobuf-vmalloc.c
+++ b/drivers/media/video/videobuf-vmalloc.c
@@ -116,7 +116,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma)
116 return; 116 return;
117} 117}
118 118
119static struct vm_operations_struct videobuf_vm_ops = 119static const struct vm_operations_struct videobuf_vm_ops =
120{ 120{
121 .open = videobuf_vm_open, 121 .open = videobuf_vm_open,
122 .close = videobuf_vm_close, 122 .close = videobuf_vm_close,
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c
index cd6a3446ab7..b034a81d2b1 100644
--- a/drivers/media/video/vino.c
+++ b/drivers/media/video/vino.c
@@ -3857,7 +3857,7 @@ static void vino_vm_close(struct vm_area_struct *vma)
3857 dprintk("vino_vm_close(): count = %d\n", fb->map_count); 3857 dprintk("vino_vm_close(): count = %d\n", fb->map_count);
3858} 3858}
3859 3859
3860static struct vm_operations_struct vino_vm_ops = { 3860static const struct vm_operations_struct vino_vm_ops = {
3861 .open = vino_vm_open, 3861 .open = vino_vm_open,
3862 .close = vino_vm_close, 3862 .close = vino_vm_close,
3863}; 3863};
diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c
index b3c6436b33b..312a71336fd 100644
--- a/drivers/media/video/zc0301/zc0301_core.c
+++ b/drivers/media/video/zc0301/zc0301_core.c
@@ -935,7 +935,7 @@ static void zc0301_vm_close(struct vm_area_struct* vma)
935} 935}
936 936
937 937
938static struct vm_operations_struct zc0301_vm_ops = { 938static const struct vm_operations_struct zc0301_vm_ops = {
939 .open = zc0301_vm_open, 939 .open = zc0301_vm_open,
940 .close = zc0301_vm_close, 940 .close = zc0301_vm_close,
941}; 941};
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
index bcdefb1bcb3..47137deafcf 100644
--- a/drivers/media/video/zoran/zoran_driver.c
+++ b/drivers/media/video/zoran/zoran_driver.c
@@ -3172,7 +3172,7 @@ zoran_vm_close (struct vm_area_struct *vma)
3172 mutex_unlock(&zr->resource_lock); 3172 mutex_unlock(&zr->resource_lock);
3173} 3173}
3174 3174
3175static struct vm_operations_struct zoran_vm_ops = { 3175static const struct vm_operations_struct zoran_vm_ops = {
3176 .open = zoran_vm_open, 3176 .open = zoran_vm_open,
3177 .close = zoran_vm_close, 3177 .close = zoran_vm_close,
3178}; 3178};