]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/tvmixer.c
[PATCH] remove many unneeded #includes of sched.h
[linux-2.6-omap-h63xx.git] / drivers / media / video / tvmixer.c
index 8318bd1aad000450713fd30bf8200a222516b12f..7ea9132a1965f86b28b85ef7a504db74bc2b83cd 100644 (file)
@@ -4,7 +4,6 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/timer.h>
 #include <linux/delay.h>
@@ -198,10 +197,6 @@ static int tvmixer_open(struct inode *inode, struct file *file)
 
        /* lock bttv in memory while the mixer is in use  */
        file->private_data = mix;
-#ifndef I2C_PEC
-       if (client->adapter->inc_use)
-               client->adapter->inc_use(client->adapter);
-#endif
        if (client->adapter->owner)
                try_module_get(client->adapter->owner);
        return 0;
@@ -217,32 +212,22 @@ static int tvmixer_release(struct inode *inode, struct file *file)
                return -ENODEV;
        }
 
-#ifndef I2C_PEC
-       if (client->adapter->dec_use)
-               client->adapter->dec_use(client->adapter);
-#endif
        if (client->adapter->owner)
                module_put(client->adapter->owner);
        return 0;
 }
 
 static struct i2c_driver driver = {
-#ifdef I2C_PEC
-       .owner           = THIS_MODULE,
-#endif
-       .name            = "tv card mixer driver",
+       .driver = {
+               .name    = "tvmixer",
+       },
        .id              = I2C_DRIVERID_TVMIXER,
-#ifdef I2C_DF_DUMMY
-       .flags           = I2C_DF_DUMMY,
-#else
-       .flags           = I2C_DF_NOTIFY,
        .detach_adapter  = tvmixer_adapters,
-#endif
        .attach_adapter  = tvmixer_adapters,
        .detach_client   = tvmixer_clients,
 };
 
-static struct file_operations tvmixer_fops = {
+static const struct file_operations tvmixer_fops = {
        .owner          = THIS_MODULE,
        .llseek         = no_llseek,
        .ioctl          = tvmixer_ioctl,
@@ -269,22 +254,8 @@ static int tvmixer_clients(struct i2c_client *client)
        struct video_audio va;
        int i,minor;
 
-#ifdef I2C_CLASS_TV_ANALOG
        if (!(client->adapter->class & I2C_CLASS_TV_ANALOG))
                return -1;
-#else
-       /* TV card ??? */
-       switch (client->adapter->id) {
-       case I2C_HW_SMBUS_VOODOO3:
-       case I2C_HW_B_BT848:
-       case I2C_HW_B_RIVA:
-               /* ok, have a look ... */
-               break;
-       default:
-               /* ignore that one */
-               return -1;
-       }
-#endif
 
        /* unregister ?? */
        for (i = 0; i < DEV_MAX; i++) {