V4L (926_2): Moves compat32 functions from fs to v4l subsystem
[safe/jmp/linux-2.6] / drivers / usb / media / pwc / pwc-if.c
index cca47f4..4f9b0dc 100644 (file)
 #include <linux/poll.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
+#include <linux/version.h>
 #include <asm/io.h>
 
 #include "pwc.h"
 #include "pwc-ioctl.h"
 #include "pwc-kiara.h"
 #include "pwc-timon.h"
-#include "pwc-dec23.h"
-#include "pwc-dec1.h"
 #include "pwc-uncompress.h"
 
 /* Function prototypes and driver templates */
@@ -112,7 +111,6 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
 static void usb_pwc_disconnect(struct usb_interface *intf);
 
 static struct usb_driver pwc_driver = {
-       .owner =                THIS_MODULE,
        .name =                 "Philips webcam",       /* name */
        .id_table =             pwc_device_table,
        .probe =                usb_pwc_probe,          /* probe() */
@@ -156,6 +154,7 @@ static struct file_operations pwc_fops = {
        .poll =         pwc_video_poll,
        .mmap =         pwc_video_mmap,
        .ioctl =        pwc_video_ioctl,
+       .compat_ioctl = v4l_compat_ioctl32,
        .llseek =       no_llseek,
 };
 static struct video_device pwc_template = {
@@ -322,6 +321,7 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
          case 730:
          case 740:
          case 750:
+#if 0    
            Trace(TRACE_MEMORY,"private_data(%zu)\n",sizeof(struct pwc_dec23_private));
            kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL);       /* Timon & Kiara */
            break;
@@ -330,11 +330,9 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
            /* TODO & FIXME */
            kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL);
            break;
+#endif  
+       ;
         }
-       if (kbuf == NULL) {
-          Err("Failed to allocate decompress table.\n");
-          return -ENOMEM;
-       }
        pdev->decompress_data = kbuf;
        
        /* Allocate image buffer; double buffer for mmap() */
@@ -1131,11 +1129,11 @@ static int pwc_video_close(struct inode *inode, struct file *file)
          case 730:
          case 740:
          case 750:
-           pwc_dec23_exit();   /* Timon & Kiara */
+/*         pwc_dec23_exit();   *//* Timon & Kiara */
            break;
          case 645:
          case 646:
-           pwc_dec1_exit();
+/*         pwc_dec1_exit(); */
            break;
         }