/shark/trunk/drivers/linuxc26/include/drivers/shark_videodev26.h |
---|
407,6 → 407,9 |
/* 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,6 → 389,7 |
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) { |
410,6 → 411,26 |
} |
/* 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); |
429,6 → 450,8 |
} |
module_init(videodev_init) |
module_exit(videodev_exit) |
/shark/trunk/drivers/linuxc26/shark_videodev.c |
---|
21,6 → 21,7 |
#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 */ |
27,8 → 28,8 |
int VIDEODEV26_open(int num) { |
if (videodev_open_inode(num)) { |
sys_shutdown_message("VIDEODEV26 ERROR: Cannot open the VideoDev driver\n"); |
sys_end(); |
printk("VIDEODEV26 ERROR: Cannot open the VideoDev driver\n"); |
return -1; |
} |
return 0; |
35,8 → 36,15 |
} |
extern int BTTV26_installed(void); |
/* Close videodev */ |
int VIDEODEV26_close(int num) { |
videodev_close_inode(num); |
return 0; |
} |
int VIDEODEV26_ioctl(int num,unsigned int cmd,unsigned long arg) { |
return videodev_ioctl_inode(num,cmd,arg); |
/shark/trunk/drivers/bttv/bttv-driver.c |
---|
2862,7 → 2862,6 |
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; |
} |
3810,7 → 3809,7 |
return rc; |
} |
void bttv_cleanup_module(void) |
static void bttv_cleanup_module(void) |
{ |
pci_unregister_driver(&bttv_pci_driver); |
return; |
/shark/trunk/drivers/bttv/shark_bttv26.c |
---|
21,7 → 21,6 |
#include <kernel/kern.h> |
extern int bttv_init_module(void); |
extern void bttv_cleanup_module(void); |
static int bttv_installed = FALSE; |
35,33 → 34,15 |
int BTTV26_init() { |
int res; |
if (bttv_installed == TRUE) |
return 0; |
videodev_init(); |
res = bttv_init_module(); |
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,8 → 24,5 |
/* Init the BTTV 2.6 Driver */ |
int BTTV26_init(void); |
/* Close the BTTV 2.6 Driver */ |
int BTTV26_close(void); |
#endif |