From patchwork Fri Nov 20 10:05:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 61619 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAKA5WRv002339 for ; Fri, 20 Nov 2009 10:05:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751774AbZKTKFB (ORCPT ); Fri, 20 Nov 2009 05:05:01 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751781AbZKTKFB (ORCPT ); Fri, 20 Nov 2009 05:05:01 -0500 Received: from perceval.irobotique.be ([92.243.18.41]:40483 "EHLO perceval.irobotique.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751748AbZKTKFA (ORCPT ); Fri, 20 Nov 2009 05:05:00 -0500 Received: from ravenclaw.localnet (unknown [91.178.224.233]) by perceval.irobotique.be (Postfix) with ESMTPSA id 5158C35DFD; Fri, 20 Nov 2009 10:05:03 +0000 (UTC) From: Laurent Pinchart To: linux-media@vger.kernel.org, hverkuil@xs4all.nl, mchehab@infradead.org Subject: [PATCH] v4l: vm_area_struct::vm_ops isn't const on pre-2.6.32 Date: Fri, 20 Nov 2009 11:05:30 +0100 User-Agent: KMail/1.12.3 (Linux/2.6.31.1; KDE/4.3.3; x86_64; ; ) MIME-Version: 1.0 Message-Id: <200911201105.30314.laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/cafe_ccic.c --- a/linux/drivers/media/video/cafe_ccic.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/cafe_ccic.c Fri Nov 20 10:54:25 2009 +0100 @@ -1326,7 +1326,11 @@ mutex_unlock(&sbuf->cam->s_mutex); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct cafe_v4l_vm_ops = { +#else static const struct vm_operations_struct cafe_v4l_vm_ops = { +#endif .open = cafe_v4l_vm_open, .close = cafe_v4l_vm_close }; diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/et61x251/et61x251_core.c --- a/linux/drivers/media/video/et61x251/et61x251_core.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/et61x251/et61x251_core.c Fri Nov 20 10:54:25 2009 +0100 @@ -1500,7 +1500,11 @@ } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct et61x251_vm_ops = { +#else static const struct vm_operations_struct et61x251_vm_ops = { +#endif .open = et61x251_vm_open, .close = et61x251_vm_close, }; diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/gspca/gspca.c --- a/linux/drivers/media/video/gspca/gspca.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/gspca/gspca.c Fri Nov 20 10:54:25 2009 +0100 @@ -103,7 +103,11 @@ frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct gspca_vm_ops = { +#else static const struct vm_operations_struct gspca_vm_ops = { +#endif .open = gspca_vm_open, .close = gspca_vm_close, }; diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/sn9c102/sn9c102_core.c --- a/linux/drivers/media/video/sn9c102/sn9c102_core.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/sn9c102/sn9c102_core.c Fri Nov 20 10:54:25 2009 +0100 @@ -2081,7 +2081,11 @@ } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct sn9c102_vm_ops = { +#else static const struct vm_operations_struct sn9c102_vm_ops = { +#endif .open = sn9c102_vm_open, .close = sn9c102_vm_close, }; diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/stk-webcam.c --- a/linux/drivers/media/video/stk-webcam.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/stk-webcam.c Fri Nov 20 10:54:25 2009 +0100 @@ -791,7 +791,11 @@ if (sbuf->mapcount == 0) sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct stk_v4l_vm_ops = { +#else static const struct vm_operations_struct stk_v4l_vm_ops = { +#endif .open = stk_v4l_vm_open, .close = stk_v4l_vm_close }; diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/uvc/uvc_v4l2.c --- a/linux/drivers/media/video/uvc/uvc_v4l2.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/uvc/uvc_v4l2.c Fri Nov 20 10:54:25 2009 +0100 @@ -1061,7 +1061,11 @@ buffer->vma_use_count--; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct uvc_vm_ops = { +#else static const struct vm_operations_struct uvc_vm_ops = { +#endif .open = uvc_vm_open, .close = uvc_vm_close, }; diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/videobuf-dma-contig.c --- a/linux/drivers/media/video/videobuf-dma-contig.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/videobuf-dma-contig.c Fri Nov 20 10:54:25 2009 +0100 @@ -107,7 +107,11 @@ } } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct videobuf_vm_ops = { +#else static const struct vm_operations_struct videobuf_vm_ops = { +#endif .open = videobuf_vm_open, .close = videobuf_vm_close, }; diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/videobuf-dma-sg.c --- a/linux/drivers/media/video/videobuf-dma-sg.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/videobuf-dma-sg.c Fri Nov 20 10:54:25 2009 +0100 @@ -422,8 +422,11 @@ } #endif -static const struct vm_operations_struct videobuf_vm_ops = -{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct videobuf_vm_ops = { +#else +static const struct vm_operations_struct videobuf_vm_ops = { +#endif .open = videobuf_vm_open, .close = videobuf_vm_close, #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/videobuf-vmalloc.c --- a/linux/drivers/media/video/videobuf-vmalloc.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/videobuf-vmalloc.c Fri Nov 20 10:54:25 2009 +0100 @@ -117,8 +117,11 @@ return; } -static const struct vm_operations_struct videobuf_vm_ops = -{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct videobuf_vm_ops = { +#else +static const struct vm_operations_struct videobuf_vm_ops = { +#endif .open = videobuf_vm_open, .close = videobuf_vm_close, }; diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/zc0301/zc0301_core.c --- a/linux/drivers/media/video/zc0301/zc0301_core.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/zc0301/zc0301_core.c Fri Nov 20 10:54:25 2009 +0100 @@ -939,7 +939,11 @@ } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct zc0301_vm_ops = { +#else static const struct vm_operations_struct zc0301_vm_ops = { +#endif .open = zc0301_vm_open, .close = zc0301_vm_close, }; diff -r 7477df192a59 -r 36e9f5dfbfa5 linux/drivers/media/video/zoran/zoran_driver.c --- a/linux/drivers/media/video/zoran/zoran_driver.c Wed Nov 18 05:12:04 2009 -0200 +++ b/linux/drivers/media/video/zoran/zoran_driver.c Fri Nov 20 10:54:25 2009 +0100 @@ -3180,7 +3180,11 @@ mutex_unlock(&zr->resource_lock); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) +static struct vm_operations_struct zoran_vm_ops = { +#else static const struct vm_operations_struct zoran_vm_ops = { +#endif .open = zoran_vm_open, .close = zoran_vm_close, };