From patchwork Tue Sep 11 12:59:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 1437601 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C33F540AF9 for ; Tue, 11 Sep 2012 12:59:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751932Ab2IKM7h (ORCPT ); Tue, 11 Sep 2012 08:59:37 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:60847 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040Ab2IKM7f (ORCPT ); Tue, 11 Sep 2012 08:59:35 -0400 Received: from axis700.grange (dslb-094-220-153-146.pools.arcor-ip.net [94.220.153.146]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LtS7s-1TasvR25SO-010ilA; Tue, 11 Sep 2012 14:59:33 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 22F4E189B0D; Tue, 11 Sep 2012 14:59:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 20DCE189AF7 for ; Tue, 11 Sep 2012 14:59:33 +0200 (CEST) Date: Tue, 11 Sep 2012 14:59:33 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Linux Media Mailing List Subject: [PATCH] media: mem2mem: make reference to struct m2m_ops in the core const Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:AkS4+RrWCrulDPQA0ijIh2WOBVwQiIOrX+thVnA/l2N eGh4u/LZDeL2DCXoQHyIcYjU5aJcmkqJkNUEjozO+bA/SLP79Z GDFTg47rcAyF8jlfaLpymuW0DBc5Ps833whpUk7iBdBybmNGbb CVwO7ieySi7Rm1+hUmg3kBoaxZB8MpG3iUqrKxCuew43C99PQ6 yWr4T6dNLXqY8IAVZ7iE5cUxG8Lj/qsXlz9Rbly7AEfd/R7Cd1 e9XrJ0HMtirOtbCQT4Msl2hMsYm25TyYLPpbCD/9agQGBKod2Q 68dYKOqzndyc4N3sywzvGn81GUnjt4e/MGk/rCcxcdHnT4a04O OgXGy3ID30bBr4DRj7oBo3nIK2q9q9j81GYxHOBAztsJpHVF3T HGGv6Ql3NqBYA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The mem2mem core doesn't change struct m2m_ops, provided by the driver, make references to it const. Signed-off-by: Guennadi Liakhovetski --- drivers/media/v4l2-core/v4l2-mem2mem.c | 4 ++-- 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 3ac8358..e4ff65d 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 { struct list_head job_queue; spinlock_t job_spinlock; - struct v4l2_m2m_ops *m2m_ops; + const struct v4l2_m2m_ops *m2m_ops; }; static struct v4l2_m2m_queue_ctx *get_queue_ctx(struct v4l2_m2m_ctx *m2m_ctx, @@ -506,7 +506,7 @@ EXPORT_SYMBOL(v4l2_m2m_mmap); * * Usually called from driver's probe() function. */ -struct v4l2_m2m_dev *v4l2_m2m_init(struct v4l2_m2m_ops *m2m_ops) +struct v4l2_m2m_dev *v4l2_m2m_init(const struct v4l2_m2m_ops *m2m_ops) { struct v4l2_m2m_dev *m2m_dev; diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h index 16ac473..d4bf29a26 100644 --- a/include/media/v4l2-mem2mem.h +++ b/include/media/v4l2-mem2mem.h @@ -122,7 +122,7 @@ unsigned int v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, int v4l2_m2m_mmap(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, struct vm_area_struct *vma); -struct v4l2_m2m_dev *v4l2_m2m_init(struct v4l2_m2m_ops *m2m_ops); +struct v4l2_m2m_dev *v4l2_m2m_init(const struct v4l2_m2m_ops *m2m_ops); void v4l2_m2m_release(struct v4l2_m2m_dev *m2m_dev); struct v4l2_m2m_ctx *v4l2_m2m_ctx_init(struct v4l2_m2m_dev *m2m_dev,