提交 745271ae 编写于 作者: C Carl Karsten 提交者: Mauro Carvalho Chehab

V4L/DVB (8023): vivi: announce that it is registered as /dev/video%d

Signed-off-by: NCarl Karsten  <carl@personnelware.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 878cf2a5
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/freezer.h> #include <linux/freezer.h>
#define MODULE_NAME "vivi"
/* Wake up at about 30 fps */ /* Wake up at about 30 fps */
#define WAKE_NUMERATOR 30 #define WAKE_NUMERATOR 30
#define WAKE_DENOMINATOR 1001 #define WAKE_DENOMINATOR 1001
...@@ -47,7 +49,7 @@ ...@@ -47,7 +49,7 @@
#include "font.h" #include "font.h"
#define VIVI_MAJOR_VERSION 0 #define VIVI_MAJOR_VERSION 0
#define VIVI_MINOR_VERSION 4 #define VIVI_MINOR_VERSION 5
#define VIVI_RELEASE 0 #define VIVI_RELEASE 0
#define VIVI_VERSION \ #define VIVI_VERSION \
KERNEL_VERSION(VIVI_MAJOR_VERSION, VIVI_MINOR_VERSION, VIVI_RELEASE) KERNEL_VERSION(VIVI_MAJOR_VERSION, VIVI_MINOR_VERSION, VIVI_RELEASE)
...@@ -1017,10 +1019,15 @@ static int vivi_release(void) ...@@ -1017,10 +1019,15 @@ static int vivi_release(void)
list_del(list); list_del(list);
dev = list_entry(list, struct vivi_dev, vivi_devlist); dev = list_entry(list, struct vivi_dev, vivi_devlist);
if (-1 != dev->vfd->minor) if (-1 != dev->vfd->minor) {
video_unregister_device(dev->vfd); video_unregister_device(dev->vfd);
else printk(KERN_INFO "%s: /dev/video%d unregistered.\n",
MODULE_NAME, dev->vfd->minor);
} else {
video_device_release(dev->vfd); video_device_release(dev->vfd);
printk(KERN_INFO "%s: /dev/video%d released.\n",
MODULE_NAME, dev->vfd->minor);
}
kfree(dev); kfree(dev);
} }
...@@ -1131,6 +1138,8 @@ static int __init vivi_init(void) ...@@ -1131,6 +1138,8 @@ static int __init vivi_init(void)
video_nr++; video_nr++;
dev->vfd = vfd; dev->vfd = vfd;
printk(KERN_INFO "%s: V4L2 device registered as /dev/video%d\n",
MODULE_NAME, vfd->minor);
} }
if (ret < 0) { if (ret < 0) {
...@@ -1138,7 +1147,9 @@ static int __init vivi_init(void) ...@@ -1138,7 +1147,9 @@ static int __init vivi_init(void)
printk(KERN_INFO "Error %d while loading vivi driver\n", ret); printk(KERN_INFO "Error %d while loading vivi driver\n", ret);
} else } else
printk(KERN_INFO "Video Technology Magazine Virtual Video " printk(KERN_INFO "Video Technology Magazine Virtual Video "
"Capture Board successfully loaded.\n"); "Capture Board ver %u.%u.%u successfully loaded.\n",
(VIVI_VERSION >> 16) & 0xFF, (VIVI_VERSION >> 8) & 0xFF,
VIVI_VERSION & 0xFF);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册