Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103825
b: refs/heads/master
c: 745271a
h: refs/heads/master
i:
  103823: df06940
v: v3
  • Loading branch information
Carl Karsten authored and Mauro Carvalho Chehab committed Jul 20, 2008
1 parent 4e10483 commit e4c206d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 878cf2a5d86c7045b480f09b56b96a779449b0f6
refs/heads/master: 745271aefec602326b1dafded778d1eb94bc50ad
19 changes: 15 additions & 4 deletions trunk/drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <linux/highmem.h>
#include <linux/freezer.h>

#define MODULE_NAME "vivi"

/* Wake up at about 30 fps */
#define WAKE_NUMERATOR 30
#define WAKE_DENOMINATOR 1001
Expand All @@ -47,7 +49,7 @@
#include "font.h"

#define VIVI_MAJOR_VERSION 0
#define VIVI_MINOR_VERSION 4
#define VIVI_MINOR_VERSION 5
#define VIVI_RELEASE 0
#define VIVI_VERSION \
KERNEL_VERSION(VIVI_MAJOR_VERSION, VIVI_MINOR_VERSION, VIVI_RELEASE)
Expand Down Expand Up @@ -1017,10 +1019,15 @@ static int vivi_release(void)
list_del(list);
dev = list_entry(list, struct vivi_dev, vivi_devlist);

if (-1 != dev->vfd->minor)
if (-1 != dev->vfd->minor) {
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);
printk(KERN_INFO "%s: /dev/video%d released.\n",
MODULE_NAME, dev->vfd->minor);
}

kfree(dev);
}
Expand Down Expand Up @@ -1131,14 +1138,18 @@ static int __init vivi_init(void)
video_nr++;

dev->vfd = vfd;
printk(KERN_INFO "%s: V4L2 device registered as /dev/video%d\n",
MODULE_NAME, vfd->minor);
}

if (ret < 0) {
vivi_release();
printk(KERN_INFO "Error %d while loading vivi driver\n", ret);
} else
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;
}

Expand Down

0 comments on commit e4c206d

Please sign in to comment.