Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 617 → Rev 618

/shark/trunk/drivers/bttv/shark_bttv26.c
21,6 → 21,7
#include <kernel/kern.h>
 
extern int bttv_init_module(void);
extern void bttv_cleanup_module(void);
 
static int bttv_installed = FALSE;
 
34,15 → 35,33
 
int BTTV26_init() {
 
int res;
 
if (bttv_installed == TRUE)
return 0;
 
videodev_init();
 
bttv_init_module();
res = bttv_init_module();
 
if (res != 0) {
sys_shutdown_message("ERROR: Cannot initialize BTTV\n");
sys_end();
}
 
bttv_installed = TRUE;
 
return 0;
 
}
 
int BTTV26_close() {
 
if (bttv_installed == FALSE)
return 0;
 
bttv_cleanup_module();
 
return 0;
 
}
/shark/trunk/drivers/bttv/include/drivers/shark_bttv26.h
24,5 → 24,8
/* Init the BTTV 2.6 Driver */
int BTTV26_init(void);
 
/* Close the BTTV 2.6 Driver */
int BTTV26_close(void);
 
#endif
 
/shark/trunk/drivers/bttv/bttv-driver.c
2862,6 → 2862,7
for (i = 0; i < bttv_num; i++) {
if (bttvs[i].video_dev->minor == minor) {
btv = &bttvs[i];
bttv_reinit_bt848(btv);
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
break;
}
3809,7 → 3810,7
return rc;
}
 
static void bttv_cleanup_module(void)
void bttv_cleanup_module(void)
{
pci_unregister_driver(&bttv_pci_driver);
return;
/shark/trunk/drivers/linuxc26/include/drivers/shark_videodev26.h
407,9 → 407,6
/* Open VideoDev Interface */
int VIDEODEV26_open(int num);
 
/* Close VideoDev Interface */
int VIDEODEV26_close(int num);
 
/* IOCTL to VideoDev device */
int VIDEODEV26_ioctl(int num,unsigned int cmd,unsigned long arg);
 
/shark/trunk/drivers/linuxc26/videodev.c
389,7 → 389,6
void *file = NULL;
 
int bttv_open(struct inode *inode, struct file *file);
int bttv_release(struct inode *inode, struct file *file);
/* Shark Inode emulation - Open */
int videodev_open_inode(int num) {
411,26 → 410,6
}
 
/* Shark Inode emulation - Close */
int videodev_close_inode(int num) {
struct inode *i;
i = (struct inode *)kmalloc(sizeof(struct inode),GFP_KERNEL);
linuxcomp_setfd(i,num);
if (bttv_release(i,file)) {
kfree(i);
return -1;
}
kfree(file);
kfree(i);
return 0;
}
 
extern int bttv_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
 
450,8 → 429,6
}
 
 
module_init(videodev_init)
module_exit(videodev_exit)
 
/shark/trunk/drivers/linuxc26/shark_videodev.c
21,7 → 21,6
#include <kernel/kern.h>
 
extern int videodev_open_inode(int num);
extern int videodev_close_inode(int num);
extern int videodev_ioctl_inode(int num,unsigned int cmd,unsigned long arg);
 
/* Open Videodev */
28,8 → 27,8
int VIDEODEV26_open(int num) {
 
if (videodev_open_inode(num)) {
printk("VIDEODEV26 ERROR: Cannot open the VideoDev driver\n");
return -1;
sys_shutdown_message("VIDEODEV26 ERROR: Cannot open the VideoDev driver\n");
sys_end();
}
 
return 0;
36,14 → 35,7
 
}
 
/* Close videodev */
int VIDEODEV26_close(int num) {
videodev_close_inode(num);
return 0;
}
extern int BTTV26_installed(void);
 
int VIDEODEV26_ioctl(int num,unsigned int cmd,unsigned long arg) {