V4L/DVB (3307): Some cleanups at I2C modules

- i2c names shorten
- removed obsoleted flags on newer modules
- small cleanups

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
diff --git a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c
index fd66d38..748d630 100644
--- a/drivers/media/video/bttv-i2c.c
+++ b/drivers/media/video/bttv-i2c.c
@@ -107,7 +107,7 @@
 static struct i2c_adapter bttv_i2c_adap_sw_template = {
 	.owner             = THIS_MODULE,
 	.class             = I2C_CLASS_TV_ANALOG,
-	.name              = "bt848",
+	.name              = "bttv",
 	.id                = I2C_HW_B_BT848,
 	.client_register   = attach_inform,
 };
@@ -274,7 +274,7 @@
 };
 
 static struct i2c_adapter bttv_i2c_adap_hw_template = {
-	.owner         = THIS_MODULE,
+	.owner             = THIS_MODULE,
 	.class         = I2C_CLASS_TV_ANALOG,
 	.name          = "bt878",
 	.id            = I2C_HW_B_BT848 /* FIXME */,
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index 29b378b..d45237d 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -939,9 +939,7 @@
 	.driver = {
 		.name = "cx25840",
 	},
-
 	.id = I2C_DRIVERID_CX25840,
-
 	.attach_adapter = cx25840_attach_adapter,
 	.detach_client = cx25840_detach_client,
 	.command = cx25840_command,
diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h
index 4260c3fa..fd22f30 100644
--- a/drivers/media/video/cx25840/cx25840.h
+++ b/drivers/media/video/cx25840/cx25840.h
@@ -20,6 +20,7 @@
 #ifndef _CX25840_H_
 #define _CX25840_H_
 
+
 #include <linux/videodev2.h>
 #include <linux/i2c.h>
 
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index caa0f58..58b0e69 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -279,7 +279,7 @@
 
 static struct i2c_driver driver = {
 	.driver = {
-		.name   = "ir remote kbd driver",
+		.name   = "ir-kbd-i2c",
 	},
 	.id             = I2C_DRIVERID_INFRARED,
 	.attach_adapter = ir_probe,
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c
index eece5fe..fbd8512 100644
--- a/drivers/media/video/msp3400-driver.c
+++ b/drivers/media/video/msp3400-driver.c
@@ -106,10 +106,8 @@
 
 /* Addresses to scan */
 static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END };
-
 I2C_CLIENT_INSMOD;
 
-
 /* ----------------------------------------------------------------------- */
 /* functions for talking to the MSP3400C Sound processor                   */
 
@@ -975,7 +973,6 @@
 	client->addr = address;
 	client->adapter = adapter;
 	client->driver = &i2c_driver;
-	client->flags = I2C_CLIENT_ALLOW_USE;
 	snprintf(client->name, sizeof(client->name) - 1, "msp3400");
 
 	if (msp_reset(client) == -1) {
@@ -1119,7 +1116,6 @@
 		.suspend = msp_suspend,
 		.resume  = msp_resume,
 	},
-	.owner          = THIS_MODULE,
 };
 
 static int __init msp3400_init_module(void)
diff --git a/drivers/media/video/saa6588.c b/drivers/media/video/saa6588.c
index ad582bd..e70b17ef 100644
--- a/drivers/media/video/saa6588.c
+++ b/drivers/media/video/saa6588.c
@@ -486,7 +486,7 @@
 
 static struct i2c_driver driver = {
 	.driver = {
-		.name = "i2c saa6588 driver",
+		.name = "saa6588",
 	},
 	.id = -1,		/* FIXME */
 	.attach_adapter = saa6588_probe,
diff --git a/drivers/media/video/saa711x.c b/drivers/media/video/saa711x.c
index 8008537..f39a7be 100644
--- a/drivers/media/video/saa711x.c
+++ b/drivers/media/video/saa711x.c
@@ -567,9 +567,7 @@
 	.driver = {
 		.name = "saa711x",
 	},
-
 	.id = I2C_DRIVERID_SAA711X,
-
 	.attach_adapter = saa711x_attach_adapter,
 	.detach_client = saa711x_detach_client,
 	.command = saa711x_command,
diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c
index 4615a98..ad73c4a6 100644
--- a/drivers/media/video/saa7134/saa6752hs.c
+++ b/drivers/media/video/saa7134/saa6752hs.c
@@ -9,7 +9,8 @@
 #include <linux/poll.h>
 #include <linux/i2c.h>
 #include <linux/types.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
+#include <media/v4l2-common.h>
 #include <linux/init.h>
 #include <linux/crc32.h>
 
@@ -509,7 +510,6 @@
 {
 	struct saa6752hs_state *h;
 
-	printk("saa6752hs: chip found @ 0x%x\n", addr<<1);
 
 	if (NULL == (h = kmalloc(sizeof(*h), GFP_KERNEL)))
 		return -ENOMEM;
@@ -525,6 +525,8 @@
 	i2c_set_clientdata(&h->client, h);
 	i2c_attach_client(&h->client);
 
+	v4l_info(&h->client,"saa6752hs: chip found @ 0x%x\n", addr<<1);
+
 	return 0;
 }
 
@@ -598,7 +600,7 @@
 
 static struct i2c_driver driver = {
 	.driver = {
-		.name   = "i2c saa6752hs MPEG encoder",
+		.name   = "saa6752hs",
 	},
 	.id             = I2C_DRIVERID_SAA6752HS,
 	.attach_adapter = saa6752hs_probe,
diff --git a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c
index c6efc98..99261f1 100644
--- a/drivers/media/video/tda7432.c
+++ b/drivers/media/video/tda7432.c
@@ -341,8 +341,8 @@
 {
 	struct tda7432 *t = i2c_get_clientdata(client);
 	v4l_dbg(2,client,"In tda7432_command\n");
-        if (debug>1)
-                v4l_i2c_print_ioctl(client,cmd);
+	if (debug>1)
+		v4l_i2c_print_ioctl(client,cmd);
 
 	switch (cmd) {
 	/* --- v4l ioctls --- */
@@ -489,7 +489,7 @@
 
 static struct i2c_driver driver = {
 	.driver = {
-		.name    = "i2c tda7432 driver",
+		.name    = "tda7432",
 	},
 	.id              = I2C_DRIVERID_TDA7432,
 	.attach_adapter  = tda7432_probe,
diff --git a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c
index 760ec3c..299393b 100644
--- a/drivers/media/video/tda9875.c
+++ b/drivers/media/video/tda9875.c
@@ -368,7 +368,7 @@
 
 static struct i2c_driver driver = {
 	.driver = {
-		.name   = "i2c tda9875 driver",
+		.name   = "tda9875",
 	},
 	.id             = I2C_DRIVERID_TDA9875,
 	.attach_adapter = tda9875_probe,
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
index f64baa4..9cf47dc 100644
--- a/drivers/media/video/tda9887.c
+++ b/drivers/media/video/tda9887.c
@@ -882,7 +882,7 @@
 	.detach_client  = tda9887_detach,
 	.command        = tda9887_command,
 	.driver = {
-		.name    = "i2c tda9887 driver",
+		.name    = "tda9887",
 		.suspend = tda9887_suspend,
 		.resume  = tda9887_resume,
 	},
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index a727c3a..57bc585 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -805,10 +805,10 @@
 	.detach_client = tuner_detach,
 	.command = tuner_command,
 	.driver = {
-		   .name = "tuner",
-		   .suspend = tuner_suspend,
-		   .resume = tuner_resume,
-		   },
+		.name    = "tuner",
+		.suspend = tuner_suspend,
+		.resume  = tuner_resume,
+	},
 };
 static struct i2c_client client_template = {
 	.name = "(tuner unset)",
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index 9f6b6d8..b582943 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -1744,10 +1744,9 @@
 	return 0;
 }
 
-
 static struct i2c_driver driver = {
 	.driver = {
-		.name    = "generic i2c audio driver",
+		.name    = "tvaudio",
 	},
 	.id              = I2C_DRIVERID_TVAUDIO,
 	.attach_adapter  = chip_probe,
diff --git a/drivers/media/video/tvmixer.c b/drivers/media/video/tvmixer.c
index ce0da9c..9e86cae 100644
--- a/drivers/media/video/tvmixer.c
+++ b/drivers/media/video/tvmixer.c
@@ -227,13 +227,9 @@
 }
 
 static struct i2c_driver driver = {
-#ifdef I2C_PEC
 	.driver = {
-		.name    = "tv card mixer driver",
+		.name    = "tvmixer",
 	},
-#else
-	.name            = "tv card mixer driver",
-#endif
 	.id              = I2C_DRIVERID_TVMIXER,
 	.detach_adapter  = tvmixer_adapters,
 	.attach_adapter  = tvmixer_adapters,
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c
index 07ad675..c35b804 100644
--- a/drivers/media/video/tvp5150.c
+++ b/drivers/media/video/tvp5150.c
@@ -30,14 +30,15 @@
 MODULE_PARM_DESC(debug, "Debug level (0-1)");
 
 #define tvp5150_info(fmt, arg...) do { \
-	printk(KERN_INFO "%s %d-%04x: " fmt, c->driver->name, \
+	printk(KERN_INFO "%s %d-%04x: " fmt, c->driver->driver.name, \
 	       i2c_adapter_id(c->adapter), c->addr , ## arg); } while (0)
 #define tvp5150_dbg(num, fmt, arg...) \
 	do { \
 		if (debug >= num) \
-			printk(KERN_DEBUG "%s debug %d-%04x: " fmt, c->driver->name, \
-			       i2c_adapter_id(c->adapter), c->addr , ## arg); \
-	} while (0)
+			printk(KERN_DEBUG "%s debug %d-%04x: " fmt,\
+				c->driver->driver.name, \
+				i2c_adapter_id(c->adapter), \
+				c->addr , ## arg); } while (0)
 
 /* supported controls */
 static struct v4l2_queryctrl tvp5150_qctrl[] = {
@@ -1137,9 +1138,7 @@
 	.driver = {
 		.name = "tvp5150",
 	},
-
-	/* FIXME */
-	.id = I2C_DRIVERID_SAA7110,
+	.id = I2C_DRIVERID_TVP5150,
 
 	.attach_adapter = tvp5150_attach_adapter,
 	.detach_client = tvp5150_detach_client,
diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c
index 20b4ec9..c2e6d2e 100644
--- a/drivers/media/video/wm8775.c
+++ b/drivers/media/video/wm8775.c
@@ -237,12 +237,10 @@
 	.driver = {
 		.name = "wm8775",
 	},
-
-	.id = I2C_DRIVERID_WM8775,
-
+	.id             = I2C_DRIVERID_WM8775,
 	.attach_adapter = wm8775_probe,
-	.detach_client = wm8775_detach,
-	.command = wm8775_command,
+	.detach_client  = wm8775_detach,
+	.command        = wm8775_command,
 };
 
 
diff --git a/include/media/tuner.h b/include/media/tuner.h
index 584f3ab..7674b12 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -214,7 +214,6 @@
 #define tuner_warn(fmt, arg...) do {\
 	printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \
 			i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)
-
 #define tuner_info(fmt, arg...) do {\
 	printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \
 			i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 51cdca8..3cc3132 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -34,7 +34,7 @@
 #define v4l_printk(level, name, adapter, addr, fmt, arg...) \
 	printk(level "%s %d-%04x: " fmt, name, i2c_adapter_id(adapter), addr , ## arg)
 
-#define v4l_client_printk(level, client, fmt, arg...) 		     \
+#define v4l_client_printk(level, client, fmt, arg...)			    \
 	v4l_printk(level, (client)->driver->driver.name, (client)->adapter, \
 		   (client)->addr, fmt , ## arg)