diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-08-29 16:31:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:36:56 -0400 |
commit | 7f8ecfab7a1d256707502207c56dd4bf3e3a026e (patch) | |
tree | 2ba6079ba59017d03f53e0ba068e099008ef21d5 /include/media/v4l2-dev.h | |
parent | 187565c43a95bcf7798c58d518ddd765933d24da (diff) |
V4L/DVB (8852): v4l2: use register_chrdev_region instead of register_chrdev
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>
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-dev.h')
-rw-r--r-- | include/media/v4l2-dev.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index fb92e3d22d7e..d129b56e1a9f 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/poll.h> | 12 | #include <linux/poll.h> |
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/cdev.h> | ||
15 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
16 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
17 | 18 | ||
@@ -47,6 +48,8 @@ struct video_device | |||
47 | 48 | ||
48 | /* sysfs */ | 49 | /* sysfs */ |
49 | struct device dev; /* v4l device */ | 50 | struct device dev; /* v4l device */ |
51 | struct cdev cdev; /* character device */ | ||
52 | void (*cdev_release)(struct kobject *kobj); | ||
50 | struct device *parent; /* device parent */ | 53 | struct device *parent; /* device parent */ |
51 | 54 | ||
52 | /* device info */ | 55 | /* device info */ |