]> err.no Git - linux-2.6/blobdiff - drivers/media/video/w9968cf.c
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[linux-2.6] / drivers / media / video / w9968cf.c
index 9f403af7b040773ccba4b4bdaa7255ff21ec59de..9e7f3e685d73a1c6bae57fee2cbf593f577a7b0f 100644 (file)
@@ -42,7 +42,6 @@
 #include <asm/page.h>
 #include <asm/uaccess.h>
 #include <linux/page-flags.h>
-#include <linux/moduleparam.h>
 
 #include "w9968cf.h"
 #include "w9968cf_decoder.h"
@@ -399,7 +398,7 @@ MODULE_PARM_DESC(specific_debug,
  ****************************************************************************/
 
 /* Video4linux interface */
-static struct file_operations w9968cf_fops;
+static const struct file_operations w9968cf_fops;
 static int w9968cf_open(struct inode*, struct file*);
 static int w9968cf_release(struct inode*, struct file*);
 static int w9968cf_mmap(struct file*, struct vm_area_struct*);
@@ -445,8 +444,6 @@ static int w9968cf_i2c_smbus_xfer(struct i2c_adapter*, u16 addr,
 static u32 w9968cf_i2c_func(struct i2c_adapter*);
 static int w9968cf_i2c_attach_inform(struct i2c_client*);
 static int w9968cf_i2c_detach_inform(struct i2c_client*);
-static int w9968cf_i2c_control(struct i2c_adapter*, unsigned int cmd,
-                              unsigned long arg);
 
 /* Memory management */
 static void* rvmalloc(unsigned long size);
@@ -1544,21 +1541,12 @@ static int w9968cf_i2c_detach_inform(struct i2c_client* client)
 }
 
 
-static int
-w9968cf_i2c_control(struct i2c_adapter* adapter, unsigned int cmd,
-                   unsigned long arg)
-{
-       return 0;
-}
-
-
 static int w9968cf_i2c_init(struct w9968cf_device* cam)
 {
        int err = 0;
 
        static struct i2c_algorithm algo = {
                .smbus_xfer =    w9968cf_i2c_smbus_xfer,
-               .algo_control =  w9968cf_i2c_control,
                .functionality = w9968cf_i2c_func,
        };
 
@@ -1573,6 +1561,7 @@ static int w9968cf_i2c_init(struct w9968cf_device* cam)
 
        memcpy(&cam->i2c_adapter, &adap, sizeof(struct i2c_adapter));
        strcpy(cam->i2c_adapter.name, "w9968cf");
+       cam->i2c_adapter.dev.parent = &cam->usbdev->dev;
        i2c_set_adapdata(&cam->i2c_adapter, cam);
 
        DBG(6, "Registering I2C adapter with kernel...")
@@ -2679,7 +2668,7 @@ static int w9968cf_open(struct inode* inode, struct file* filp)
 
        /* This the only safe way to prevent race conditions with disconnect */
        if (!down_read_trylock(&w9968cf_disconnect))
-               return -ERESTARTSYS;
+               return -EAGAIN;
 
        cam = (struct w9968cf_device*)video_get_drvdata(video_devdata(filp));
 
@@ -3466,7 +3455,7 @@ ioctl_fail:
 }
 
 
-static struct file_operations w9968cf_fops = {
+static const struct file_operations w9968cf_fops = {
        .owner =   THIS_MODULE,
        .open =    w9968cf_open,
        .release = w9968cf_release,