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
|