diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-09-11 05:32:17 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-19 10:35:18 -0500 |
commit | b1252eb83fe57b838c19e2c65cba685c93696693 (patch) | |
tree | a2b4bf064f85a8b11438944fabe541016be6a604 | |
parent | 7b2607c99e36854987df2f78eb540cd712490450 (diff) |
[media] media: mem2mem: make reference to struct m2m_ops in the core const
The mem2mem core doesn't change struct m2m_ops, provided by the driver,
make references to it const.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/v4l2-core/v4l2-mem2mem.c | 4 | ||||
-rw-r--r-- | include/media/v4l2-mem2mem.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 438ea45d1074..da99cf727162 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c | |||
@@ -62,7 +62,7 @@ struct v4l2_m2m_dev { | |||
62 | struct list_head job_queue; | 62 | struct list_head job_queue; |
63 | spinlock_t job_spinlock; | 63 | spinlock_t job_spinlock; |
64 | 64 | ||
65 | struct v4l2_m2m_ops *m2m_ops; | 65 | const struct v4l2_m2m_ops *m2m_ops; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static struct v4l2_m2m_queue_ctx *get_queue_ctx(struct v4l2_m2m_ctx *m2m_ctx, | 68 | static struct v4l2_m2m_queue_ctx *get_queue_ctx(struct v4l2_m2m_ctx *m2m_ctx, |
@@ -519,7 +519,7 @@ EXPORT_SYMBOL(v4l2_m2m_mmap); | |||
519 | * | 519 | * |
520 | * Usually called from driver's probe() function. | 520 | * Usually called from driver's probe() function. |
521 | */ | 521 | */ |
522 | struct v4l2_m2m_dev *v4l2_m2m_init(struct v4l2_m2m_ops *m2m_ops) | 522 | struct v4l2_m2m_dev *v4l2_m2m_init(const struct v4l2_m2m_ops *m2m_ops) |
523 | { | 523 | { |
524 | struct v4l2_m2m_dev *m2m_dev; | 524 | struct v4l2_m2m_dev *m2m_dev; |
525 | 525 | ||
diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h index 7e82d2b193d5..d3eef01da648 100644 --- a/include/media/v4l2-mem2mem.h +++ b/include/media/v4l2-mem2mem.h | |||
@@ -125,7 +125,7 @@ unsigned int v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, | |||
125 | int v4l2_m2m_mmap(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, | 125 | int v4l2_m2m_mmap(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, |
126 | struct vm_area_struct *vma); | 126 | struct vm_area_struct *vma); |
127 | 127 | ||
128 | struct v4l2_m2m_dev *v4l2_m2m_init(struct v4l2_m2m_ops *m2m_ops); | 128 | struct v4l2_m2m_dev *v4l2_m2m_init(const struct v4l2_m2m_ops *m2m_ops); |
129 | void v4l2_m2m_release(struct v4l2_m2m_dev *m2m_dev); | 129 | void v4l2_m2m_release(struct v4l2_m2m_dev *m2m_dev); |
130 | 130 | ||
131 | struct v4l2_m2m_ctx *v4l2_m2m_ctx_init(struct v4l2_m2m_dev *m2m_dev, | 131 | struct v4l2_m2m_ctx *v4l2_m2m_ctx_init(struct v4l2_m2m_dev *m2m_dev, |