All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Fitzsimons <robfitz@273k.net>
To: Andrew Morton <akpm@osdl.org>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>,
	greg@kroah.com, 76306.1226@compuserve.com, fork0@t-online.de,
	linux-kernel@vger.kernel.org, mchehab@infradead.org,
	shemminger@osdl.org, video4linux-list@redhat.com,
	v4l-dvb-maintainer@linuxtv.org
Subject: [PATCH] V4L: struct video_device corruption
Date: Sat, 15 Jul 2006 23:08:49 +0000	[thread overview]
Message-ID: <20060715230849.GA3385@localhost> (raw)
In-Reply-To: <20060712224453.5faeea4a.akpm@osdl.org>

The layout of struct video_device would change depending on whether
videodev.h (V4L1) was include or not before v4l2-dev.h, which caused
the structure to get corrupted.  Include the vidiocgmbuf function
pointer in video_device regardless of the V4L version.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
---
 include/media/v4l2-dev.h |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 62dae1a..69059d8 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -194,10 +194,11 @@ struct video_device
 
 
 	int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i);
-#ifdef HAVE_V4L1
-			/* buffer type is struct vidio_mbuf * */
+	/*
+	 * vidiocgmbuf is part of the V4L1 API
+	 * buffer type is struct vidio_mbuf *
+	 */
 	int (*vidiocgmbuf)  (struct file *file, void *fh, struct video_mbuf *p);
-#endif
 	int (*vidioc_g_fbuf)   (struct file *file, void *fh,
 				struct v4l2_framebuffer *a);
 	int (*vidioc_s_fbuf)   (struct file *file, void *fh,
-- 
1.4.1.ga3e6


  reply	other threads:[~2006-07-15 23:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-13  4:43 oops in bttv Chuck Ebbert
2006-07-13  5:05 ` Greg KH
2006-07-13  5:24   ` Randy.Dunlap
2006-07-13  5:44     ` Andrew Morton
2006-07-15 23:08       ` Robert Fitzsimons [this message]
2006-07-16  1:31         ` [PATCH] V4L: struct video_device corruption Mauro Carvalho Chehab
2006-07-18  0:25           ` [v4l-dvb-maintainer] " Trent Piepho
2006-07-19 11:54             ` Mauro Carvalho Chehab
2006-07-19 15:36               ` Michael Krufky
2006-07-20 21:57               ` Trent Piepho
2006-07-21 12:26                 ` Mauro Carvalho Chehab
2006-07-21 20:06                   ` Trent Piepho
2006-07-21 20:30                     ` Mauro Carvalho Chehab
2006-07-21 22:55                       ` Trent Piepho
2006-07-23  9:35                         ` Mauro Carvalho Chehab
2006-07-24  2:16                           ` Trent Piepho
2006-07-24 12:34                             ` Mauro Carvalho Chehab
2006-07-24 22:06                               ` Trent Piepho
2006-07-25 17:59                                 ` Mauro Carvalho Chehab
2006-07-25  3:08           ` Andrew Morton
2006-07-25  7:57             ` [v4l-dvb-maintainer] " Manu Abraham
2006-07-25  8:42             ` Trent Piepho
2006-07-25  9:06               ` Andrew Morton
2006-07-25 12:28                 ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060715230849.GA3385@localhost \
    --to=robfitz@273k.net \
    --cc=76306.1226@compuserve.com \
    --cc=akpm@osdl.org \
    --cc=fork0@t-online.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=rdunlap@xenotime.net \
    --cc=shemminger@osdl.org \
    --cc=v4l-dvb-maintainer@linuxtv.org \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.