diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-29 22:31:35 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-29 22:31:35 +0200 |
commit | 937ba8f2a0dc3b8cdb98de9a48c256ad24427ac9 (patch) | |
tree | 46ad5e82925449b3469d0aec284b0285c4f87979 /linux/include | |
parent | 6f9aa9413aac5a24f2e03dc48b2ff3db0ccafc92 (diff) | |
download | mediapointer-dvb-s2-937ba8f2a0dc3b8cdb98de9a48c256ad24427ac9.tar.gz mediapointer-dvb-s2-937ba8f2a0dc3b8cdb98de9a48c256ad24427ac9.tar.bz2 |
v4l2: use register_chrdev_region instead of register_chrdev
From: Hans Verkuil <hverkuil@xs4all.nl>
Replace the old register_chrdev with the more flexible register_chrdev_region.
Ensure that the release() is called when the very last chardev usage was
released, and not when the sysfs devices were removed. This should simplify
hotpluggable drivers considerably.
Tested-by: Mike Isely <isely@isely.net>
Tested-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: David Ellingsworth <david@identd.dyndns.org>
Reviewed-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Diffstat (limited to 'linux/include')
-rw-r--r-- | linux/include/media/v4l2-dev.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index ba05b8164..9158ad8b5 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -12,6 +12,7 @@ #include <linux/poll.h> #include <linux/fs.h> #include <linux/device.h> +#include <linux/cdev.h> #include <linux/mutex.h> #include <linux/videodev2.h> @@ -51,6 +52,8 @@ struct video_device #else struct class_device dev; #endif + struct cdev cdev; /* character device */ + void (*cdev_release)(struct kobject *kobj); struct device *parent; /* device parent */ /* device info */ |