LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-19-2011, 12:04 PM   #1
Gilbert Brisset
LQ Newbie
 
Registered: Jan 2011
Posts: 5

Rep: Reputation: 0
V4L2 kernel API changes leads to regression


I have developped a basic video grabber board and its driver.
The driver is V4L2 compatible so I can display video with xawtv.
This was developped on Fedora 10 with a 2.6.27 kernel and works fine.
The same doesn't work on Fedora 12 or RHEL 6 with a 2.6.32 kernel.
Modprobing my driver leads to a violent system crash.
The crash occurs when I register the driver in V4L2 with the
video_register_device() system call.
This call is prototyped in
/usr/src/kernels/2.6.32-37.el6.i686/include/media/v4l2-dev.h :

int video_register_device(struct video_device *vdev, int type, int nr);

The video_device structure has been modified between 2.6.32 and 2.6.37.
I fill only 4 fields in this structure :
name = "GRABBER_V4L2",
fops = &_fops,
minor = -1,
release = video_device_release

The new version of the structure adds 2 extra fields :

/* Set either parent or v4l2_dev if your driver uses v4l2_device */
struct device *parent; /* device parent */
struct v4l2_device *v4l2_dev; /* v4l2_device parent */

Is it necessary to set one of this fields ?
They are actually set to NULL. Can this explain the crash ?

Thank you
 
Old 01-19-2011, 02:33 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Gilbert Brisset View Post
Code:
  /* Set either parent or v4l2_dev if your driver uses v4l2_device */
  struct device *parent;		/* device parent */
  struct v4l2_device *v4l2_dev;	/* v4l2_device parent */
Is it necessary to set one of these fields ?
The comment seems to indicate that you have to set at least one.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unreliable suspend with i915 due to regression in 2.6.35 kernel Bourdieu Slackware 1 01-20-2011 03:54 AM
LXer: Windows Media Player Regression Leads to SeaMonkey 1.0.4 Release LXer Syndicated Linux News 0 08-04-2006 08:21 PM
booting the kernel leads to a system hang? DeathCrush19 Mandriva 1 09-29-2004 12:03 PM
Dropped laptop, leads to kernel panic? Tarts Linux - Laptop and Netbook 4 10-25-2003 01:09 AM
Kernel recompile leads to console graphics problem CragStar Linux From Scratch 3 05-14-2003 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration