mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Tested-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Acked-by: David Ellingsworth <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
187565c43a
commit
7f8ecfab7a
2 changed files with 66 additions and 68 deletions
|
|
@ -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>
|
||||
|
||||
|
|
@ -47,6 +48,8 @@ struct video_device
|
|||
|
||||
/* sysfs */
|
||||
struct device dev; /* v4l device */
|
||||
struct cdev cdev; /* character device */
|
||||
void (*cdev_release)(struct kobject *kobj);
|
||||
struct device *parent; /* device parent */
|
||||
|
||||
/* device info */
|
||||
|
|
|
|||
Loading…
Reference in a new issue