diff options
author | Catalin Climov <devnull@localhost> | 2005-08-16 14:49:21 +0000 |
---|---|---|
committer | Catalin Climov <devnull@localhost> | 2005-08-16 14:49:21 +0000 |
commit | b9c8314916a547aefded0e96a6e5adfcc85a7c14 (patch) | |
tree | 5f13b42d2c8023ce45c406c02de8c2cebb4d1ef0 /linux/drivers/media/video/cx88/cx88-blackbird.c | |
parent | 021c03d384f6c242565a43c859cd7c45defcf39c (diff) | |
download | mediapointer-dvb-s2-b9c8314916a547aefded0e96a6e5adfcc85a7c14.tar.gz mediapointer-dvb-s2-b9c8314916a547aefded0e96a6e5adfcc85a7c14.tar.bz2 |
Prepare for factoring out some common code (see ChangeLog for details).
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-blackbird.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-blackbird.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c index 0fe3e334a..03adcd1d4 100644 --- a/linux/drivers/media/video/cx88/cx88-blackbird.c +++ b/linux/drivers/media/video/cx88/cx88-blackbird.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-blackbird.c,v 1.29 2005/08/16 11:43:43 catalin Exp $ + * $Id: cx88-blackbird.c,v 1.30 2005/08/16 14:49:21 catalin Exp $ * * Support for a cx23416 mpeg encoder via cx2388x host port. * "blackbird" reference design. @@ -971,10 +971,20 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file, return 0; } +int (*cx88_ioctl_hook)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg); +unsigned int (*cx88_ioctl_translator)(unsigned int cmd); + +static unsigned int mpeg_translate_ioctl(unsigned int cmd) +{ + return cmd; +} + static int mpeg_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) + unsigned int cmd, unsigned long arg) { - return video_usercopy(inode, file, cmd, arg, mpeg_do_ioctl); + cmd = cx88_ioctl_translator( cmd ); + return video_usercopy(inode, file, cmd, arg, cx88_ioctl_hook); } static int mpeg_open(struct inode *inode, struct file *file) @@ -1209,6 +1219,8 @@ static int blackbird_init(void) printk(KERN_INFO "cx2388x: snapshot date %04d-%02d-%02d\n", SNAPSHOT/10000, (SNAPSHOT/100)%100, SNAPSHOT%100); #endif + cx88_ioctl_hook = mpeg_do_ioctl; + cx88_ioctl_translator = mpeg_translate_ioctl; return pci_register_driver(&blackbird_pci_driver); } @@ -1220,6 +1232,9 @@ static void blackbird_fini(void) module_init(blackbird_init); module_exit(blackbird_fini); +EXPORT_SYMBOL(cx88_ioctl_hook); +EXPORT_SYMBOL(cx88_ioctl_translator); + /* ----------------------------------------------------------- */ /* * Local variables: |