]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/tea6420.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
[linux-2.6-omap-h63xx.git] / drivers / media / video / tea6420.c
index 4dcba5a4fff099d95a19b61391c4925e6df47f92..4ff6c63f7237517a05d974fd60cfbcbb838af0cf 100644 (file)
@@ -26,6 +26,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   */
 
+
 #include <linux/module.h>
 #include <linux/ioctl.h>
 #include <linux/i2c.h>
@@ -36,10 +37,10 @@ static int debug = 0;               /* insmod parameter */
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
 #define dprintk(args...) \
-            do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION__, __LINE__); printk(args); } } while (0)
+           do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __FUNCTION__, __LINE__); printk(args); } } while (0)
 
 /* addresses to scan, found only at 0x4c and/or 0x4d (7-Bit) */
-static unsigned short normal_i2c[] = { I2C_TEA6420_1, I2C_TEA6420_2, I2C_CLIENT_END };
+static unsigned short normal_i2c[] = { I2C_ADDR_TEA6420_1, I2C_ADDR_TEA6420_2, I2C_CLIENT_END };
 
 /* magic definition of all other variables and things */
 I2C_CLIENT_INSMOD;
@@ -56,7 +57,7 @@ static int tea6420_switch(struct i2c_client *client, int i, int o, int g)
 
        dprintk("adr:0x%02x, i:%d, o:%d, g:%d\n", client->addr, i, o, g);
 
-       /* check if the paramters are valid */
+       /* check if the parameters are valid */
        if (i < 1 || i > 6 || o < 1 || o > 4 || g < 0 || g > 6 || g % 2 != 0)
                return -1;
 
@@ -83,7 +84,7 @@ static int tea6420_switch(struct i2c_client *client, int i, int o, int g)
                dprintk("i2c_smbus_write_byte() failed, ret:%d\n", ret);
                return -EIO;
        }
-       
+
        return 0;
 }
 
@@ -100,7 +101,7 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind)
 
        /* allocate memory for client structure */
        client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
-       if (0 == client) {
+       if (!client) {
                return -ENOMEM;
        }
 
@@ -167,7 +168,7 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg)
 
 static struct i2c_driver driver = {
        .driver = {
-               .name   = "tea6420",
+               .name = "tea6420",
        },
        .id     = I2C_DRIVERID_TEA6420,
        .attach_adapter = attach,