aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:53:26 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-01-09 12:53:26 -0500
commitcab462f716cdd522edc71436482d8734e8258489 (patch)
treec3ec0ceaee9b5d61148afea728cc6c05e682856f /drivers
parent0680481c8e6260e1780a0900990531f0193b0dd4 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/bttv-i2c.c4
-rw-r--r--drivers/media/video/cx25840/cx25840-core.c2
-rw-r--r--drivers/media/video/cx25840/cx25840.h1
-rw-r--r--drivers/media/video/ir-kbd-i2c.c2
-rw-r--r--drivers/media/video/msp3400-driver.c4
-rw-r--r--drivers/media/video/saa6588.c2
-rw-r--r--drivers/media/video/saa711x.c2
-rw-r--r--drivers/media/video/saa7134/saa6752hs.c8
-rw-r--r--drivers/media/video/tda7432.c6
-rw-r--r--drivers/media/video/tda9875.c2
-rw-r--r--drivers/media/video/tda9887.c2
-rw-r--r--drivers/media/video/tuner-core.c8
-rw-r--r--drivers/media/video/tvaudio.c3
-rw-r--r--drivers/media/video/tvmixer.c6
-rw-r--r--drivers/media/video/tvp5150.c13
-rw-r--r--drivers/media/video/wm8775.c8
16 files changed, 30 insertions, 43 deletions
diff --git a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c
index fd66d386fa7d..748d630c7fe4 100644
--- a/drivers/media/video/bttv-i2c.c
+++ b/drivers/media/video/bttv-i2c.c
@@ -107,7 +107,7 @@ static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = {
107static struct i2c_adapter bttv_i2c_adap_sw_template = { 107static struct i2c_adapter bttv_i2c_adap_sw_template = {
108 .owner = THIS_MODULE, 108 .owner = THIS_MODULE,
109 .class = I2C_CLASS_TV_ANALOG, 109 .class = I2C_CLASS_TV_ANALOG,
110 .name = "bt848", 110 .name = "bttv",
111 .id = I2C_HW_B_BT848, 111 .id = I2C_HW_B_BT848,
112 .client_register = attach_inform, 112 .client_register = attach_inform,
113}; 113};
@@ -274,7 +274,7 @@ static struct i2c_algorithm bttv_algo = {
274}; 274};
275 275
276static struct i2c_adapter bttv_i2c_adap_hw_template = { 276static struct i2c_adapter bttv_i2c_adap_hw_template = {
277 .owner = THIS_MODULE, 277 .owner = THIS_MODULE,
278 .class = I2C_CLASS_TV_ANALOG, 278 .class = I2C_CLASS_TV_ANALOG,
279 .name = "bt878", 279 .name = "bt878",
280 .id = I2C_HW_B_BT848 /* FIXME */, 280 .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 29b378b6097d..d45237d508c4 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -939,9 +939,7 @@ static struct i2c_driver i2c_driver_cx25840 = {
939 .driver = { 939 .driver = {
940 .name = "cx25840", 940 .name = "cx25840",
941 }, 941 },
942
943 .id = I2C_DRIVERID_CX25840, 942 .id = I2C_DRIVERID_CX25840,
944
945 .attach_adapter = cx25840_attach_adapter, 943 .attach_adapter = cx25840_attach_adapter,
946 .detach_client = cx25840_detach_client, 944 .detach_client = cx25840_detach_client,
947 .command = cx25840_command, 945 .command = cx25840_command,
diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h
index 4260c3faa37a..fd22f30dcc1b 100644
--- a/drivers/media/video/cx25840/cx25840.h
+++ b/drivers/media/video/cx25840/cx25840.h
@@ -20,6 +20,7 @@
20#ifndef _CX25840_H_ 20#ifndef _CX25840_H_
21#define _CX25840_H_ 21#define _CX25840_H_
22 22
23
23#include <linux/videodev2.h> 24#include <linux/videodev2.h>
24#include <linux/i2c.h> 25#include <linux/i2c.h>
25 26
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index caa0f58d149e..58b0e6982822 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -279,7 +279,7 @@ static int ir_probe(struct i2c_adapter *adap);
279 279
280static struct i2c_driver driver = { 280static struct i2c_driver driver = {
281 .driver = { 281 .driver = {
282 .name = "ir remote kbd driver", 282 .name = "ir-kbd-i2c",
283 }, 283 },
284 .id = I2C_DRIVERID_INFRARED, 284 .id = I2C_DRIVERID_INFRARED,
285 .attach_adapter = ir_probe, 285 .attach_adapter = ir_probe,
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c
index eece5fe46cbe..fbd85120c331 100644
--- a/drivers/media/video/msp3400-driver.c
+++ b/drivers/media/video/msp3400-driver.c
@@ -106,10 +106,8 @@ MODULE_PARM_DESC(dolby, "Activates Dolby processsing");
106 106
107/* Addresses to scan */ 107/* Addresses to scan */
108static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END }; 108static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END };
109
110I2C_CLIENT_INSMOD; 109I2C_CLIENT_INSMOD;
111 110
112
113/* ----------------------------------------------------------------------- */ 111/* ----------------------------------------------------------------------- */
114/* functions for talking to the MSP3400C Sound processor */ 112/* functions for talking to the MSP3400C Sound processor */
115 113
@@ -975,7 +973,6 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind)
975 client->addr = address; 973 client->addr = address;
976 client->adapter = adapter; 974 client->adapter = adapter;
977 client->driver = &i2c_driver; 975 client->driver = &i2c_driver;
978 client->flags = I2C_CLIENT_ALLOW_USE;
979 snprintf(client->name, sizeof(client->name) - 1, "msp3400"); 976 snprintf(client->name, sizeof(client->name) - 1, "msp3400");
980 977
981 if (msp_reset(client) == -1) { 978 if (msp_reset(client) == -1) {
@@ -1119,7 +1116,6 @@ static struct i2c_driver i2c_driver = {
1119 .suspend = msp_suspend, 1116 .suspend = msp_suspend,
1120 .resume = msp_resume, 1117 .resume = msp_resume,
1121 }, 1118 },
1122 .owner = THIS_MODULE,
1123}; 1119};
1124 1120
1125static int __init msp3400_init_module(void) 1121static int __init msp3400_init_module(void)
diff --git a/drivers/media/video/saa6588.c b/drivers/media/video/saa6588.c
index ad582bd39819..e70b17ef36e9 100644
--- a/drivers/media/video/saa6588.c
+++ b/drivers/media/video/saa6588.c
@@ -486,7 +486,7 @@ static int saa6588_command(struct i2c_client *client, unsigned int cmd,
486 486
487static struct i2c_driver driver = { 487static struct i2c_driver driver = {
488 .driver = { 488 .driver = {
489 .name = "i2c saa6588 driver", 489 .name = "saa6588",
490 }, 490 },
491 .id = -1, /* FIXME */ 491 .id = -1, /* FIXME */
492 .attach_adapter = saa6588_probe, 492 .attach_adapter = saa6588_probe,
diff --git a/drivers/media/video/saa711x.c b/drivers/media/video/saa711x.c
index 8008537391b5..f39a7be08588 100644
--- a/drivers/media/video/saa711x.c
+++ b/drivers/media/video/saa711x.c
@@ -567,9 +567,7 @@ static struct i2c_driver i2c_driver_saa711x = {
567 .driver = { 567 .driver = {
568 .name = "saa711x", 568 .name = "saa711x",
569 }, 569 },
570
571 .id = I2C_DRIVERID_SAA711X, 570 .id = I2C_DRIVERID_SAA711X,
572
573 .attach_adapter = saa711x_attach_adapter, 571 .attach_adapter = saa711x_attach_adapter,
574 .detach_client = saa711x_detach_client, 572 .detach_client = saa711x_detach_client,
575 .command = saa711x_command, 573 .command = saa711x_command,
diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c
index 4615a982ac64..ad73c4a60f2b 100644
--- a/drivers/media/video/saa7134/saa6752hs.c
+++ b/drivers/media/video/saa7134/saa6752hs.c
@@ -9,7 +9,8 @@
9#include <linux/poll.h> 9#include <linux/poll.h>
10#include <linux/i2c.h> 10#include <linux/i2c.h>
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/videodev.h> 12#include <linux/videodev2.h>
13#include <media/v4l2-common.h>
13#include <linux/init.h> 14#include <linux/init.h>
14#include <linux/crc32.h> 15#include <linux/crc32.h>
15 16
@@ -509,7 +510,6 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind)
509{ 510{
510 struct saa6752hs_state *h; 511 struct saa6752hs_state *h;
511 512
512 printk("saa6752hs: chip found @ 0x%x\n", addr<<1);
513 513
514 if (NULL == (h = kmalloc(sizeof(*h), GFP_KERNEL))) 514 if (NULL == (h = kmalloc(sizeof(*h), GFP_KERNEL)))
515 return -ENOMEM; 515 return -ENOMEM;
@@ -525,6 +525,8 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind)
525 i2c_set_clientdata(&h->client, h); 525 i2c_set_clientdata(&h->client, h);
526 i2c_attach_client(&h->client); 526 i2c_attach_client(&h->client);
527 527
528 v4l_info(&h->client,"saa6752hs: chip found @ 0x%x\n", addr<<1);
529
528 return 0; 530 return 0;
529} 531}
530 532
@@ -598,7 +600,7 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
598 600
599static struct i2c_driver driver = { 601static struct i2c_driver driver = {
600 .driver = { 602 .driver = {
601 .name = "i2c saa6752hs MPEG encoder", 603 .name = "saa6752hs",
602 }, 604 },
603 .id = I2C_DRIVERID_SAA6752HS, 605 .id = I2C_DRIVERID_SAA6752HS,
604 .attach_adapter = saa6752hs_probe, 606 .attach_adapter = saa6752hs_probe,
diff --git a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c
index c6efc9826ba5..99261f15e66e 100644
--- a/drivers/media/video/tda7432.c
+++ b/drivers/media/video/tda7432.c
@@ -341,8 +341,8 @@ static int tda7432_command(struct i2c_client *client,
341{ 341{
342 struct tda7432 *t = i2c_get_clientdata(client); 342 struct tda7432 *t = i2c_get_clientdata(client);
343 v4l_dbg(2,client,"In tda7432_command\n"); 343 v4l_dbg(2,client,"In tda7432_command\n");
344 if (debug>1) 344 if (debug>1)
345 v4l_i2c_print_ioctl(client,cmd); 345 v4l_i2c_print_ioctl(client,cmd);
346 346
347 switch (cmd) { 347 switch (cmd) {
348 /* --- v4l ioctls --- */ 348 /* --- v4l ioctls --- */
@@ -489,7 +489,7 @@ static int tda7432_command(struct i2c_client *client,
489 489
490static struct i2c_driver driver = { 490static struct i2c_driver driver = {
491 .driver = { 491 .driver = {
492 .name = "i2c tda7432 driver", 492 .name = "tda7432",
493 }, 493 },
494 .id = I2C_DRIVERID_TDA7432, 494 .id = I2C_DRIVERID_TDA7432,
495 .attach_adapter = tda7432_probe, 495 .attach_adapter = tda7432_probe,
diff --git a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c
index 760ec3c2ac67..299393bf900a 100644
--- a/drivers/media/video/tda9875.c
+++ b/drivers/media/video/tda9875.c
@@ -368,7 +368,7 @@ static int tda9875_command(struct i2c_client *client,
368 368
369static struct i2c_driver driver = { 369static struct i2c_driver driver = {
370 .driver = { 370 .driver = {
371 .name = "i2c tda9875 driver", 371 .name = "tda9875",
372 }, 372 },
373 .id = I2C_DRIVERID_TDA9875, 373 .id = I2C_DRIVERID_TDA9875,
374 .attach_adapter = tda9875_probe, 374 .attach_adapter = tda9875_probe,
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
index f64baa4b0025..9cf47dc65579 100644
--- a/drivers/media/video/tda9887.c
+++ b/drivers/media/video/tda9887.c
@@ -882,7 +882,7 @@ static struct i2c_driver driver = {
882 .detach_client = tda9887_detach, 882 .detach_client = tda9887_detach,
883 .command = tda9887_command, 883 .command = tda9887_command,
884 .driver = { 884 .driver = {
885 .name = "i2c tda9887 driver", 885 .name = "tda9887",
886 .suspend = tda9887_suspend, 886 .suspend = tda9887_suspend,
887 .resume = tda9887_resume, 887 .resume = tda9887_resume,
888 }, 888 },
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index a727c3ae62c3..57bc585a6955 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -805,10 +805,10 @@ static struct i2c_driver driver = {
805 .detach_client = tuner_detach, 805 .detach_client = tuner_detach,
806 .command = tuner_command, 806 .command = tuner_command,
807 .driver = { 807 .driver = {
808 .name = "tuner", 808 .name = "tuner",
809 .suspend = tuner_suspend, 809 .suspend = tuner_suspend,
810 .resume = tuner_resume, 810 .resume = tuner_resume,
811 }, 811 },
812}; 812};
813static struct i2c_client client_template = { 813static struct i2c_client client_template = {
814 .name = "(tuner unset)", 814 .name = "(tuner unset)",
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index 9f6b6d855f00..b582943a0d3e 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -1744,10 +1744,9 @@ static int chip_command(struct i2c_client *client,
1744 return 0; 1744 return 0;
1745} 1745}
1746 1746
1747
1748static struct i2c_driver driver = { 1747static struct i2c_driver driver = {
1749 .driver = { 1748 .driver = {
1750 .name = "generic i2c audio driver", 1749 .name = "tvaudio",
1751 }, 1750 },
1752 .id = I2C_DRIVERID_TVAUDIO, 1751 .id = I2C_DRIVERID_TVAUDIO,
1753 .attach_adapter = chip_probe, 1752 .attach_adapter = chip_probe,
diff --git a/drivers/media/video/tvmixer.c b/drivers/media/video/tvmixer.c
index ce0da9c1a768..9e86caeb96a7 100644
--- a/drivers/media/video/tvmixer.c
+++ b/drivers/media/video/tvmixer.c
@@ -227,13 +227,9 @@ static int tvmixer_release(struct inode *inode, struct file *file)
227} 227}
228 228
229static struct i2c_driver driver = { 229static struct i2c_driver driver = {
230#ifdef I2C_PEC
231 .driver = { 230 .driver = {
232 .name = "tv card mixer driver", 231 .name = "tvmixer",
233 }, 232 },
234#else
235 .name = "tv card mixer driver",
236#endif
237 .id = I2C_DRIVERID_TVMIXER, 233 .id = I2C_DRIVERID_TVMIXER,
238 .detach_adapter = tvmixer_adapters, 234 .detach_adapter = tvmixer_adapters,
239 .attach_adapter = tvmixer_adapters, 235 .attach_adapter = tvmixer_adapters,
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c
index 07ad675cd58e..c35b8042eee5 100644
--- a/drivers/media/video/tvp5150.c
+++ b/drivers/media/video/tvp5150.c
@@ -30,14 +30,15 @@ module_param(debug, int, 0);
30MODULE_PARM_DESC(debug, "Debug level (0-1)"); 30MODULE_PARM_DESC(debug, "Debug level (0-1)");
31 31
32#define tvp5150_info(fmt, arg...) do { \ 32#define tvp5150_info(fmt, arg...) do { \
33 printk(KERN_INFO "%s %d-%04x: " fmt, c->driver->name, \ 33 printk(KERN_INFO "%s %d-%04x: " fmt, c->driver->driver.name, \
34 i2c_adapter_id(c->adapter), c->addr , ## arg); } while (0) 34 i2c_adapter_id(c->adapter), c->addr , ## arg); } while (0)
35#define tvp5150_dbg(num, fmt, arg...) \ 35#define tvp5150_dbg(num, fmt, arg...) \
36 do { \ 36 do { \
37 if (debug >= num) \ 37 if (debug >= num) \
38 printk(KERN_DEBUG "%s debug %d-%04x: " fmt, c->driver->name, \ 38 printk(KERN_DEBUG "%s debug %d-%04x: " fmt,\
39 i2c_adapter_id(c->adapter), c->addr , ## arg); \ 39 c->driver->driver.name, \
40 } while (0) 40 i2c_adapter_id(c->adapter), \
41 c->addr , ## arg); } while (0)
41 42
42/* supported controls */ 43/* supported controls */
43static struct v4l2_queryctrl tvp5150_qctrl[] = { 44static struct v4l2_queryctrl tvp5150_qctrl[] = {
@@ -1137,9 +1138,7 @@ static struct i2c_driver driver = {
1137 .driver = { 1138 .driver = {
1138 .name = "tvp5150", 1139 .name = "tvp5150",
1139 }, 1140 },
1140 1141 .id = I2C_DRIVERID_TVP5150,
1141 /* FIXME */
1142 .id = I2C_DRIVERID_SAA7110,
1143 1142
1144 .attach_adapter = tvp5150_attach_adapter, 1143 .attach_adapter = tvp5150_attach_adapter,
1145 .detach_client = tvp5150_detach_client, 1144 .detach_client = tvp5150_detach_client,
diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c
index 20b4ec93d7c9..c2e6d2e9f5f1 100644
--- a/drivers/media/video/wm8775.c
+++ b/drivers/media/video/wm8775.c
@@ -237,12 +237,10 @@ static struct i2c_driver i2c_driver = {
237 .driver = { 237 .driver = {
238 .name = "wm8775", 238 .name = "wm8775",
239 }, 239 },
240 240 .id = I2C_DRIVERID_WM8775,
241 .id = I2C_DRIVERID_WM8775,
242
243 .attach_adapter = wm8775_probe, 241 .attach_adapter = wm8775_probe,
244 .detach_client = wm8775_detach, 242 .detach_client = wm8775_detach,
245 .command = wm8775_command, 243 .command = wm8775_command,
246}; 244};
247 245
248 246