diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-08-15 13:57:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-05 12:14:35 -0400 |
commit | fae91e72b79ba9a21f0ce7551a1fd7e8984c85a6 (patch) | |
tree | 1db62e590a010d7ece7f170aedbcc72c8f126122 /drivers/media | |
parent | 5b5439652af79106b792faf79b2c1e787e143ba0 (diff) |
[PATCH] I2C: Drop I2C_DEVNAME and i2c_clientname
I2C_DEVNAME and i2c_clientname were introduced in 2.5.68 [1] to help
media/video driver authors who wanted their code to be compatible with
both Linux 2.4 and 2.6. The cause of the incompatibility has gone since
[2], so I think we can get rid of them, as they tend to make the code
harder to read and longer to preprocess/compile for no more benefit.
I'd hope nobody seriously attempts to keep media/video driver compatible
across Linux trees anymore, BTW.
[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=104930186524598&w=2
[2] http://www.linuxhq.com/kernel/v2.6/0-test3/include/linux/i2c.h
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/bt832.c | 2 | ||||
-rw-r--r-- | drivers/media/video/bttv-i2c.c | 8 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-i2c.c | 8 | ||||
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/msp3400.c | 4 | ||||
-rw-r--r-- | drivers/media/video/ovcamchip/ovcamchip_core.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa6752hs.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-i2c.c | 6 | ||||
-rw-r--r-- | drivers/media/video/tda7432.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tda9840.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tda9875.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tda9887.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tea6415c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tea6420.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tuner-core.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tvaudio.c | 41 | ||||
-rw-r--r-- | drivers/media/video/tvmixer.c | 8 | ||||
-rw-r--r-- | drivers/media/video/zoran_card.c | 2 |
18 files changed, 50 insertions, 53 deletions
diff --git a/drivers/media/video/bt832.c b/drivers/media/video/bt832.c index 67ffed8a7fea..76c1b63ebdf2 100644 --- a/drivers/media/video/bt832.c +++ b/drivers/media/video/bt832.c | |||
@@ -241,7 +241,7 @@ static struct i2c_driver driver = { | |||
241 | }; | 241 | }; |
242 | static struct i2c_client client_template = | 242 | static struct i2c_client client_template = |
243 | { | 243 | { |
244 | I2C_DEVNAME("bt832"), | 244 | .name = "bt832", |
245 | .flags = I2C_CLIENT_ALLOW_USE, | 245 | .flags = I2C_CLIENT_ALLOW_USE, |
246 | .driver = &driver, | 246 | .driver = &driver, |
247 | }; | 247 | }; |
diff --git a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c index 1db95f75ac68..706dc48df962 100644 --- a/drivers/media/video/bttv-i2c.c +++ b/drivers/media/video/bttv-i2c.c | |||
@@ -109,7 +109,7 @@ static struct i2c_adapter bttv_i2c_adap_sw_template = { | |||
109 | #ifdef I2C_CLASS_TV_ANALOG | 109 | #ifdef I2C_CLASS_TV_ANALOG |
110 | .class = I2C_CLASS_TV_ANALOG, | 110 | .class = I2C_CLASS_TV_ANALOG, |
111 | #endif | 111 | #endif |
112 | I2C_DEVNAME("bt848"), | 112 | .name = "bt848", |
113 | .id = I2C_HW_B_BT848, | 113 | .id = I2C_HW_B_BT848, |
114 | .client_register = attach_inform, | 114 | .client_register = attach_inform, |
115 | }; | 115 | }; |
@@ -280,7 +280,7 @@ static struct i2c_adapter bttv_i2c_adap_hw_template = { | |||
280 | #ifdef I2C_CLASS_TV_ANALOG | 280 | #ifdef I2C_CLASS_TV_ANALOG |
281 | .class = I2C_CLASS_TV_ANALOG, | 281 | .class = I2C_CLASS_TV_ANALOG, |
282 | #endif | 282 | #endif |
283 | I2C_DEVNAME("bt878"), | 283 | .name = "bt878", |
284 | .id = I2C_HW_B_BT848 /* FIXME */, | 284 | .id = I2C_HW_B_BT848 /* FIXME */, |
285 | .algo = &bttv_algo, | 285 | .algo = &bttv_algo, |
286 | .client_register = attach_inform, | 286 | .client_register = attach_inform, |
@@ -296,7 +296,7 @@ static int attach_inform(struct i2c_client *client) | |||
296 | if (bttv_debug) | 296 | if (bttv_debug) |
297 | printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n", | 297 | printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n", |
298 | btv->c.nr,client->driver->name,client->addr, | 298 | btv->c.nr,client->driver->name,client->addr, |
299 | i2c_clientname(client)); | 299 | client->name); |
300 | if (!client->driver->command) | 300 | if (!client->driver->command) |
301 | return 0; | 301 | return 0; |
302 | 302 | ||
@@ -324,7 +324,7 @@ void bttv_call_i2c_clients(struct bttv *btv, unsigned int cmd, void *arg) | |||
324 | } | 324 | } |
325 | 325 | ||
326 | static struct i2c_client bttv_i2c_client_template = { | 326 | static struct i2c_client bttv_i2c_client_template = { |
327 | I2C_DEVNAME("bttv internal"), | 327 | .name = "bttv internal", |
328 | }; | 328 | }; |
329 | 329 | ||
330 | 330 | ||
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index a628a55299c6..7f598039e025 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c | |||
@@ -95,7 +95,7 @@ static int attach_inform(struct i2c_client *client) | |||
95 | struct cx88_core *core = i2c_get_adapdata(client->adapter); | 95 | struct cx88_core *core = i2c_get_adapdata(client->adapter); |
96 | 96 | ||
97 | dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n", | 97 | dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n", |
98 | client->driver->name,client->addr,i2c_clientname(client)); | 98 | client->driver->name, client->addr, client->name); |
99 | if (!client->driver->command) | 99 | if (!client->driver->command) |
100 | return 0; | 100 | return 0; |
101 | 101 | ||
@@ -128,7 +128,7 @@ static int detach_inform(struct i2c_client *client) | |||
128 | { | 128 | { |
129 | struct cx88_core *core = i2c_get_adapdata(client->adapter); | 129 | struct cx88_core *core = i2c_get_adapdata(client->adapter); |
130 | 130 | ||
131 | dprintk(1, "i2c detach [client=%s]\n", i2c_clientname(client)); | 131 | dprintk(1, "i2c detach [client=%s]\n", client->name); |
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | 134 | ||
@@ -152,7 +152,7 @@ static struct i2c_algo_bit_data cx8800_i2c_algo_template = { | |||
152 | /* ----------------------------------------------------------------------- */ | 152 | /* ----------------------------------------------------------------------- */ |
153 | 153 | ||
154 | static struct i2c_adapter cx8800_i2c_adap_template = { | 154 | static struct i2c_adapter cx8800_i2c_adap_template = { |
155 | I2C_DEVNAME("cx2388x"), | 155 | .name = "cx2388x", |
156 | .owner = THIS_MODULE, | 156 | .owner = THIS_MODULE, |
157 | .id = I2C_HW_B_CX2388x, | 157 | .id = I2C_HW_B_CX2388x, |
158 | .client_register = attach_inform, | 158 | .client_register = attach_inform, |
@@ -160,7 +160,7 @@ static struct i2c_adapter cx8800_i2c_adap_template = { | |||
160 | }; | 160 | }; |
161 | 161 | ||
162 | static struct i2c_client cx8800_i2c_client_template = { | 162 | static struct i2c_client cx8800_i2c_client_template = { |
163 | I2C_DEVNAME("cx88xx internal"), | 163 | .name = "cx88xx internal", |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static char *i2c_devs[128] = { | 166 | static char *i2c_devs[128] = { |
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index feccf08bc0e3..1e273ff3f956 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -308,7 +308,7 @@ static struct i2c_driver driver = { | |||
308 | 308 | ||
309 | static struct i2c_client client_template = | 309 | static struct i2c_client client_template = |
310 | { | 310 | { |
311 | I2C_DEVNAME("unset"), | 311 | .name = "unset", |
312 | .driver = &driver | 312 | .driver = &driver |
313 | }; | 313 | }; |
314 | 314 | ||
diff --git a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c index e956234abf24..ca02f6f14b00 100644 --- a/drivers/media/video/msp3400.c +++ b/drivers/media/video/msp3400.c | |||
@@ -1437,7 +1437,7 @@ static struct i2c_driver driver = { | |||
1437 | 1437 | ||
1438 | static struct i2c_client client_template = | 1438 | static struct i2c_client client_template = |
1439 | { | 1439 | { |
1440 | I2C_DEVNAME("(unset)"), | 1440 | .name = "(unset)", |
1441 | .flags = I2C_CLIENT_ALLOW_USE, | 1441 | .flags = I2C_CLIENT_ALLOW_USE, |
1442 | .driver = &driver, | 1442 | .driver = &driver, |
1443 | }; | 1443 | }; |
@@ -1509,7 +1509,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind) | |||
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | /* hello world :-) */ | 1511 | /* hello world :-) */ |
1512 | printk(KERN_INFO "msp34xx: init: chip=%s",i2c_clientname(c)); | 1512 | printk(KERN_INFO "msp34xx: init: chip=%s", c->name); |
1513 | if (HAVE_NICAM(msp)) | 1513 | if (HAVE_NICAM(msp)) |
1514 | printk(" +nicam"); | 1514 | printk(" +nicam"); |
1515 | if (HAVE_SIMPLE(msp)) | 1515 | if (HAVE_SIMPLE(msp)) |
diff --git a/drivers/media/video/ovcamchip/ovcamchip_core.c b/drivers/media/video/ovcamchip/ovcamchip_core.c index b98c64ab7c58..2de34ebf0673 100644 --- a/drivers/media/video/ovcamchip/ovcamchip_core.c +++ b/drivers/media/video/ovcamchip/ovcamchip_core.c | |||
@@ -314,7 +314,7 @@ static int ovcamchip_attach(struct i2c_adapter *adap) | |||
314 | } | 314 | } |
315 | memcpy(c, &client_template, sizeof *c); | 315 | memcpy(c, &client_template, sizeof *c); |
316 | c->adapter = adap; | 316 | c->adapter = adap; |
317 | strcpy(i2c_clientname(c), "OV????"); | 317 | strcpy(c->name, "OV????"); |
318 | 318 | ||
319 | ov = kmalloc(sizeof *ov, GFP_KERNEL); | 319 | ov = kmalloc(sizeof *ov, GFP_KERNEL); |
320 | if (!ov) { | 320 | if (!ov) { |
@@ -328,7 +328,7 @@ static int ovcamchip_attach(struct i2c_adapter *adap) | |||
328 | if (rc < 0) | 328 | if (rc < 0) |
329 | goto error; | 329 | goto error; |
330 | 330 | ||
331 | strcpy(i2c_clientname(c), chip_names[ov->subtype]); | 331 | strcpy(c->name, chip_names[ov->subtype]); |
332 | 332 | ||
333 | PDEBUG(1, "Camera chip detection complete"); | 333 | PDEBUG(1, "Camera chip detection complete"); |
334 | 334 | ||
@@ -421,7 +421,7 @@ static struct i2c_driver driver = { | |||
421 | }; | 421 | }; |
422 | 422 | ||
423 | static struct i2c_client client_template = { | 423 | static struct i2c_client client_template = { |
424 | I2C_DEVNAME("(unset)"), | 424 | .name = "(unset)", |
425 | .driver = &driver, | 425 | .driver = &driver, |
426 | }; | 426 | }; |
427 | 427 | ||
diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c index 79d05ea1b69b..382911c6ef22 100644 --- a/drivers/media/video/saa7134/saa6752hs.c +++ b/drivers/media/video/saa7134/saa6752hs.c | |||
@@ -598,7 +598,7 @@ static struct i2c_driver driver = { | |||
598 | 598 | ||
599 | static struct i2c_client client_template = | 599 | static struct i2c_client client_template = |
600 | { | 600 | { |
601 | I2C_DEVNAME("saa6752hs"), | 601 | .name = "saa6752hs", |
602 | .flags = I2C_CLIENT_ALLOW_USE, | 602 | .flags = I2C_CLIENT_ALLOW_USE, |
603 | .driver = &driver, | 603 | .driver = &driver, |
604 | }; | 604 | }; |
diff --git a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c index 238ac3fdeb4a..eae6b529713f 100644 --- a/drivers/media/video/saa7134/saa7134-i2c.c +++ b/drivers/media/video/saa7134/saa7134-i2c.c | |||
@@ -334,7 +334,7 @@ static int attach_inform(struct i2c_client *client) | |||
334 | struct tuner_setup tun_setup; | 334 | struct tuner_setup tun_setup; |
335 | 335 | ||
336 | d1printk( "%s i2c attach [addr=0x%x,client=%s]\n", | 336 | d1printk( "%s i2c attach [addr=0x%x,client=%s]\n", |
337 | client->driver->name,client->addr,i2c_clientname(client)); | 337 | client->driver->name, client->addr, client->name); |
338 | 338 | ||
339 | if (!client->driver->command) | 339 | if (!client->driver->command) |
340 | return 0; | 340 | return 0; |
@@ -380,14 +380,14 @@ static struct i2c_adapter saa7134_adap_template = { | |||
380 | #ifdef I2C_CLASS_TV_ANALOG | 380 | #ifdef I2C_CLASS_TV_ANALOG |
381 | .class = I2C_CLASS_TV_ANALOG, | 381 | .class = I2C_CLASS_TV_ANALOG, |
382 | #endif | 382 | #endif |
383 | I2C_DEVNAME("saa7134"), | 383 | .name = "saa7134", |
384 | .id = I2C_HW_SAA7134, | 384 | .id = I2C_HW_SAA7134, |
385 | .algo = &saa7134_algo, | 385 | .algo = &saa7134_algo, |
386 | .client_register = attach_inform, | 386 | .client_register = attach_inform, |
387 | }; | 387 | }; |
388 | 388 | ||
389 | static struct i2c_client saa7134_client_template = { | 389 | static struct i2c_client saa7134_client_template = { |
390 | I2C_DEVNAME("saa7134 internal"), | 390 | .name = "saa7134 internal", |
391 | }; | 391 | }; |
392 | 392 | ||
393 | /* ----------------------------------------------------------- */ | 393 | /* ----------------------------------------------------------- */ |
diff --git a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c index bc6b6c0cea6d..255b6088ebf9 100644 --- a/drivers/media/video/tda7432.c +++ b/drivers/media/video/tda7432.c | |||
@@ -513,7 +513,7 @@ static struct i2c_driver driver = { | |||
513 | 513 | ||
514 | static struct i2c_client client_template = | 514 | static struct i2c_client client_template = |
515 | { | 515 | { |
516 | I2C_DEVNAME("tda7432"), | 516 | .name = "tda7432", |
517 | .driver = &driver, | 517 | .driver = &driver, |
518 | }; | 518 | }; |
519 | 519 | ||
diff --git a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c index c0594e09d63e..1794686612c6 100644 --- a/drivers/media/video/tda9840.c +++ b/drivers/media/video/tda9840.c | |||
@@ -231,7 +231,7 @@ static struct i2c_driver driver = { | |||
231 | }; | 231 | }; |
232 | 232 | ||
233 | static struct i2c_client client_template = { | 233 | static struct i2c_client client_template = { |
234 | I2C_DEVNAME("tda9840"), | 234 | .name = "tda9840", |
235 | .driver = &driver, | 235 | .driver = &driver, |
236 | }; | 236 | }; |
237 | 237 | ||
diff --git a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c index 3eaf2e1211e5..7e3dcdb262b0 100644 --- a/drivers/media/video/tda9875.c +++ b/drivers/media/video/tda9875.c | |||
@@ -384,7 +384,7 @@ static struct i2c_driver driver = { | |||
384 | 384 | ||
385 | static struct i2c_client client_template = | 385 | static struct i2c_client client_template = |
386 | { | 386 | { |
387 | I2C_DEVNAME("tda9875"), | 387 | .name = "tda9875", |
388 | .driver = &driver, | 388 | .driver = &driver, |
389 | }; | 389 | }; |
390 | 390 | ||
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c index abb96ce464c7..d60fc562aecd 100644 --- a/drivers/media/video/tda9887.c +++ b/drivers/media/video/tda9887.c | |||
@@ -793,7 +793,7 @@ static struct i2c_driver driver = { | |||
793 | }; | 793 | }; |
794 | static struct i2c_client client_template = | 794 | static struct i2c_client client_template = |
795 | { | 795 | { |
796 | I2C_DEVNAME("tda9887"), | 796 | .name = "tda9887", |
797 | .flags = I2C_CLIENT_ALLOW_USE, | 797 | .flags = I2C_CLIENT_ALLOW_USE, |
798 | .driver = &driver, | 798 | .driver = &driver, |
799 | }; | 799 | }; |
diff --git a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c index 8334d6ccd0a0..ee3688348b66 100644 --- a/drivers/media/video/tea6415c.c +++ b/drivers/media/video/tea6415c.c | |||
@@ -200,7 +200,7 @@ static struct i2c_driver driver = { | |||
200 | }; | 200 | }; |
201 | 201 | ||
202 | static struct i2c_client client_template = { | 202 | static struct i2c_client client_template = { |
203 | I2C_DEVNAME("tea6415c"), | 203 | .name = "tea6415c", |
204 | .driver = &driver, | 204 | .driver = &driver, |
205 | }; | 205 | }; |
206 | 206 | ||
diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c index 9d09d2d23c2e..17975c19da5e 100644 --- a/drivers/media/video/tea6420.c +++ b/drivers/media/video/tea6420.c | |||
@@ -177,7 +177,7 @@ static struct i2c_driver driver = { | |||
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct i2c_client client_template = { | 179 | static struct i2c_client client_template = { |
180 | I2C_DEVNAME("tea6420"), | 180 | .name = "tea6420", |
181 | .driver = &driver, | 181 | .driver = &driver, |
182 | }; | 182 | }; |
183 | 183 | ||
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index a155e99a263b..3b1893c2ae3b 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -709,7 +709,7 @@ static struct i2c_driver driver = { | |||
709 | }, | 709 | }, |
710 | }; | 710 | }; |
711 | static struct i2c_client client_template = { | 711 | static struct i2c_client client_template = { |
712 | I2C_DEVNAME("(tuner unset)"), | 712 | .name = "(tuner unset)", |
713 | .flags = I2C_CLIENT_ALLOW_USE, | 713 | .flags = I2C_CLIENT_ALLOW_USE, |
714 | .driver = &driver, | 714 | .driver = &driver, |
715 | }; | 715 | }; |
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index f6aab89593ea..258724b2d6d2 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -162,24 +162,23 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val) | |||
162 | unsigned char buffer[2]; | 162 | unsigned char buffer[2]; |
163 | 163 | ||
164 | if (-1 == subaddr) { | 164 | if (-1 == subaddr) { |
165 | dprintk("%s: chip_write: 0x%x\n", | 165 | dprintk("%s: chip_write: 0x%x\n", chip->c.name, val); |
166 | i2c_clientname(&chip->c), val); | ||
167 | chip->shadow.bytes[1] = val; | 166 | chip->shadow.bytes[1] = val; |
168 | buffer[0] = val; | 167 | buffer[0] = val; |
169 | if (1 != i2c_master_send(&chip->c,buffer,1)) { | 168 | if (1 != i2c_master_send(&chip->c,buffer,1)) { |
170 | printk(KERN_WARNING "%s: I/O error (write 0x%x)\n", | 169 | printk(KERN_WARNING "%s: I/O error (write 0x%x)\n", |
171 | i2c_clientname(&chip->c), val); | 170 | chip->c.name, val); |
172 | return -1; | 171 | return -1; |
173 | } | 172 | } |
174 | } else { | 173 | } else { |
175 | dprintk("%s: chip_write: reg%d=0x%x\n", | 174 | dprintk("%s: chip_write: reg%d=0x%x\n", |
176 | i2c_clientname(&chip->c), subaddr, val); | 175 | chip->c.name, subaddr, val); |
177 | chip->shadow.bytes[subaddr+1] = val; | 176 | chip->shadow.bytes[subaddr+1] = val; |
178 | buffer[0] = subaddr; | 177 | buffer[0] = subaddr; |
179 | buffer[1] = val; | 178 | buffer[1] = val; |
180 | if (2 != i2c_master_send(&chip->c,buffer,2)) { | 179 | if (2 != i2c_master_send(&chip->c,buffer,2)) { |
181 | printk(KERN_WARNING "%s: I/O error (write reg%d=0x%x)\n", | 180 | printk(KERN_WARNING "%s: I/O error (write reg%d=0x%x)\n", |
182 | i2c_clientname(&chip->c), subaddr, val); | 181 | chip->c.name, subaddr, val); |
183 | return -1; | 182 | return -1; |
184 | } | 183 | } |
185 | } | 184 | } |
@@ -203,11 +202,10 @@ static int chip_read(struct CHIPSTATE *chip) | |||
203 | unsigned char buffer; | 202 | unsigned char buffer; |
204 | 203 | ||
205 | if (1 != i2c_master_recv(&chip->c,&buffer,1)) { | 204 | if (1 != i2c_master_recv(&chip->c,&buffer,1)) { |
206 | printk(KERN_WARNING "%s: I/O error (read)\n", | 205 | printk(KERN_WARNING "%s: I/O error (read)\n", chip->c.name); |
207 | i2c_clientname(&chip->c)); | ||
208 | return -1; | 206 | return -1; |
209 | } | 207 | } |
210 | dprintk("%s: chip_read: 0x%x\n",i2c_clientname(&chip->c),buffer); | 208 | dprintk("%s: chip_read: 0x%x\n", chip->c.name, buffer); |
211 | return buffer; | 209 | return buffer; |
212 | } | 210 | } |
213 | 211 | ||
@@ -222,12 +220,11 @@ static int chip_read2(struct CHIPSTATE *chip, int subaddr) | |||
222 | write[0] = subaddr; | 220 | write[0] = subaddr; |
223 | 221 | ||
224 | if (2 != i2c_transfer(chip->c.adapter,msgs,2)) { | 222 | if (2 != i2c_transfer(chip->c.adapter,msgs,2)) { |
225 | printk(KERN_WARNING "%s: I/O error (read2)\n", | 223 | printk(KERN_WARNING "%s: I/O error (read2)\n", chip->c.name); |
226 | i2c_clientname(&chip->c)); | ||
227 | return -1; | 224 | return -1; |
228 | } | 225 | } |
229 | dprintk("%s: chip_read2: reg%d=0x%x\n", | 226 | dprintk("%s: chip_read2: reg%d=0x%x\n", |
230 | i2c_clientname(&chip->c),subaddr,read[0]); | 227 | chip->c.name, subaddr, read[0]); |
231 | return read[0]; | 228 | return read[0]; |
232 | } | 229 | } |
233 | 230 | ||
@@ -240,7 +237,7 @@ static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd) | |||
240 | 237 | ||
241 | /* update our shadow register set; print bytes if (debug > 0) */ | 238 | /* update our shadow register set; print bytes if (debug > 0) */ |
242 | dprintk("%s: chip_cmd(%s): reg=%d, data:", | 239 | dprintk("%s: chip_cmd(%s): reg=%d, data:", |
243 | i2c_clientname(&chip->c),name,cmd->bytes[0]); | 240 | chip->c.name, name, cmd->bytes[0]); |
244 | for (i = 1; i < cmd->count; i++) { | 241 | for (i = 1; i < cmd->count; i++) { |
245 | dprintk(" 0x%x",cmd->bytes[i]); | 242 | dprintk(" 0x%x",cmd->bytes[i]); |
246 | chip->shadow.bytes[i+cmd->bytes[0]] = cmd->bytes[i]; | 243 | chip->shadow.bytes[i+cmd->bytes[0]] = cmd->bytes[i]; |
@@ -249,7 +246,7 @@ static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd) | |||
249 | 246 | ||
250 | /* send data to the chip */ | 247 | /* send data to the chip */ |
251 | if (cmd->count != i2c_master_send(&chip->c,cmd->bytes,cmd->count)) { | 248 | if (cmd->count != i2c_master_send(&chip->c,cmd->bytes,cmd->count)) { |
252 | printk(KERN_WARNING "%s: I/O error (%s)\n", i2c_clientname(&chip->c), name); | 249 | printk(KERN_WARNING "%s: I/O error (%s)\n", chip->c.name, name); |
253 | return -1; | 250 | return -1; |
254 | } | 251 | } |
255 | return 0; | 252 | return 0; |
@@ -274,9 +271,9 @@ static int chip_thread(void *data) | |||
274 | struct CHIPSTATE *chip = data; | 271 | struct CHIPSTATE *chip = data; |
275 | struct CHIPDESC *desc = chiplist + chip->type; | 272 | struct CHIPDESC *desc = chiplist + chip->type; |
276 | 273 | ||
277 | daemonize("%s",i2c_clientname(&chip->c)); | 274 | daemonize("%s", chip->c.name); |
278 | allow_signal(SIGTERM); | 275 | allow_signal(SIGTERM); |
279 | dprintk("%s: thread started\n", i2c_clientname(&chip->c)); | 276 | dprintk("%s: thread started\n", chip->c.name); |
280 | 277 | ||
281 | for (;;) { | 278 | for (;;) { |
282 | add_wait_queue(&chip->wq, &wait); | 279 | add_wait_queue(&chip->wq, &wait); |
@@ -288,7 +285,7 @@ static int chip_thread(void *data) | |||
288 | try_to_freeze(); | 285 | try_to_freeze(); |
289 | if (chip->done || signal_pending(current)) | 286 | if (chip->done || signal_pending(current)) |
290 | break; | 287 | break; |
291 | dprintk("%s: thread wakeup\n", i2c_clientname(&chip->c)); | 288 | dprintk("%s: thread wakeup\n", chip->c.name); |
292 | 289 | ||
293 | /* don't do anything for radio or if mode != auto */ | 290 | /* don't do anything for radio or if mode != auto */ |
294 | if (chip->norm == VIDEO_MODE_RADIO || chip->mode != 0) | 291 | if (chip->norm == VIDEO_MODE_RADIO || chip->mode != 0) |
@@ -301,7 +298,7 @@ static int chip_thread(void *data) | |||
301 | mod_timer(&chip->wt, jiffies+2*HZ); | 298 | mod_timer(&chip->wt, jiffies+2*HZ); |
302 | } | 299 | } |
303 | 300 | ||
304 | dprintk("%s: thread exiting\n", i2c_clientname(&chip->c)); | 301 | dprintk("%s: thread exiting\n", chip->c.name); |
305 | complete_and_exit(&chip->texit, 0); | 302 | complete_and_exit(&chip->texit, 0); |
306 | return 0; | 303 | return 0; |
307 | } | 304 | } |
@@ -314,7 +311,7 @@ static void generic_checkmode(struct CHIPSTATE *chip) | |||
314 | if (mode == chip->prevmode) | 311 | if (mode == chip->prevmode) |
315 | return; | 312 | return; |
316 | 313 | ||
317 | dprintk("%s: thread checkmode\n", i2c_clientname(&chip->c)); | 314 | dprintk("%s: thread checkmode\n", chip->c.name); |
318 | chip->prevmode = mode; | 315 | chip->prevmode = mode; |
319 | 316 | ||
320 | if (mode & VIDEO_SOUND_STEREO) | 317 | if (mode & VIDEO_SOUND_STEREO) |
@@ -1501,7 +1498,7 @@ static int chip_attach(struct i2c_adapter *adap, int addr, int kind) | |||
1501 | (desc->flags & CHIP_HAS_INPUTSEL) ? " audiomux" : ""); | 1498 | (desc->flags & CHIP_HAS_INPUTSEL) ? " audiomux" : ""); |
1502 | 1499 | ||
1503 | /* fill required data structures */ | 1500 | /* fill required data structures */ |
1504 | strcpy(i2c_clientname(&chip->c),desc->name); | 1501 | strcpy(chip->c.name, desc->name); |
1505 | chip->type = desc-chiplist; | 1502 | chip->type = desc-chiplist; |
1506 | chip->shadow.count = desc->registers+1; | 1503 | chip->shadow.count = desc->registers+1; |
1507 | chip->prevmode = -1; | 1504 | chip->prevmode = -1; |
@@ -1538,7 +1535,7 @@ static int chip_attach(struct i2c_adapter *adap, int addr, int kind) | |||
1538 | chip->tpid = kernel_thread(chip_thread,(void *)chip,0); | 1535 | chip->tpid = kernel_thread(chip_thread,(void *)chip,0); |
1539 | if (chip->tpid < 0) | 1536 | if (chip->tpid < 0) |
1540 | printk(KERN_WARNING "%s: kernel_thread() failed\n", | 1537 | printk(KERN_WARNING "%s: kernel_thread() failed\n", |
1541 | i2c_clientname(&chip->c)); | 1538 | chip->c.name); |
1542 | wake_up_interruptible(&chip->wq); | 1539 | wake_up_interruptible(&chip->wq); |
1543 | } | 1540 | } |
1544 | return 0; | 1541 | return 0; |
@@ -1591,7 +1588,7 @@ static int chip_command(struct i2c_client *client, | |||
1591 | struct CHIPSTATE *chip = i2c_get_clientdata(client); | 1588 | struct CHIPSTATE *chip = i2c_get_clientdata(client); |
1592 | struct CHIPDESC *desc = chiplist + chip->type; | 1589 | struct CHIPDESC *desc = chiplist + chip->type; |
1593 | 1590 | ||
1594 | dprintk("%s: chip_command 0x%x\n",i2c_clientname(&chip->c),cmd); | 1591 | dprintk("%s: chip_command 0x%x\n", chip->c.name, cmd); |
1595 | 1592 | ||
1596 | switch (cmd) { | 1593 | switch (cmd) { |
1597 | case AUDC_SET_INPUT: | 1594 | case AUDC_SET_INPUT: |
@@ -1702,7 +1699,7 @@ static struct i2c_driver driver = { | |||
1702 | 1699 | ||
1703 | static struct i2c_client client_template = | 1700 | static struct i2c_client client_template = |
1704 | { | 1701 | { |
1705 | I2C_DEVNAME("(unset)"), | 1702 | .name = "(unset)", |
1706 | .flags = I2C_CLIENT_ALLOW_USE, | 1703 | .flags = I2C_CLIENT_ALLOW_USE, |
1707 | .driver = &driver, | 1704 | .driver = &driver, |
1708 | }; | 1705 | }; |
diff --git a/drivers/media/video/tvmixer.c b/drivers/media/video/tvmixer.c index f0635b19de30..a43301a154af 100644 --- a/drivers/media/video/tvmixer.c +++ b/drivers/media/video/tvmixer.c | |||
@@ -91,7 +91,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm | |||
91 | if (cmd == SOUND_MIXER_INFO) { | 91 | if (cmd == SOUND_MIXER_INFO) { |
92 | mixer_info info; | 92 | mixer_info info; |
93 | strlcpy(info.id, "tv card", sizeof(info.id)); | 93 | strlcpy(info.id, "tv card", sizeof(info.id)); |
94 | strlcpy(info.name, i2c_clientname(client), sizeof(info.name)); | 94 | strlcpy(info.name, client->name, sizeof(info.name)); |
95 | info.modify_counter = 42 /* FIXME */; | 95 | info.modify_counter = 42 /* FIXME */; |
96 | if (copy_to_user(argp, &info, sizeof(info))) | 96 | if (copy_to_user(argp, &info, sizeof(info))) |
97 | return -EFAULT; | 97 | return -EFAULT; |
@@ -100,7 +100,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm | |||
100 | if (cmd == SOUND_OLD_MIXER_INFO) { | 100 | if (cmd == SOUND_OLD_MIXER_INFO) { |
101 | _old_mixer_info info; | 101 | _old_mixer_info info; |
102 | strlcpy(info.id, "tv card", sizeof(info.id)); | 102 | strlcpy(info.id, "tv card", sizeof(info.id)); |
103 | strlcpy(info.name, i2c_clientname(client), sizeof(info.name)); | 103 | strlcpy(info.name, client->name, sizeof(info.name)); |
104 | if (copy_to_user(argp, &info, sizeof(info))) | 104 | if (copy_to_user(argp, &info, sizeof(info))) |
105 | return -EFAULT; | 105 | return -EFAULT; |
106 | return 0; | 106 | return 0; |
@@ -295,7 +295,7 @@ static int tvmixer_clients(struct i2c_client *client) | |||
295 | devices[i].dev = NULL; | 295 | devices[i].dev = NULL; |
296 | devices[i].minor = -1; | 296 | devices[i].minor = -1; |
297 | printk("tvmixer: %s unregistered (#1)\n", | 297 | printk("tvmixer: %s unregistered (#1)\n", |
298 | i2c_clientname(client)); | 298 | client->name); |
299 | return 0; | 299 | return 0; |
300 | } | 300 | } |
301 | } | 301 | } |
@@ -354,7 +354,7 @@ static void __exit tvmixer_cleanup_module(void) | |||
354 | if (devices[i].minor != -1) { | 354 | if (devices[i].minor != -1) { |
355 | unregister_sound_mixer(devices[i].minor); | 355 | unregister_sound_mixer(devices[i].minor); |
356 | printk("tvmixer: %s unregistered (#2)\n", | 356 | printk("tvmixer: %s unregistered (#2)\n", |
357 | i2c_clientname(devices[i].dev)); | 357 | devices[i].dev->name); |
358 | } | 358 | } |
359 | } | 359 | } |
360 | } | 360 | } |
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c index 25743085b2d5..eed2acea1779 100644 --- a/drivers/media/video/zoran_card.c +++ b/drivers/media/video/zoran_card.c | |||
@@ -737,7 +737,7 @@ static struct i2c_algo_bit_data zoran_i2c_bit_data_template = { | |||
737 | }; | 737 | }; |
738 | 738 | ||
739 | static struct i2c_adapter zoran_i2c_adapter_template = { | 739 | static struct i2c_adapter zoran_i2c_adapter_template = { |
740 | I2C_DEVNAME("zr36057"), | 740 | .name = "zr36057", |
741 | .id = I2C_HW_B_ZR36067, | 741 | .id = I2C_HW_B_ZR36067, |
742 | .algo = NULL, | 742 | .algo = NULL, |
743 | .client_register = zoran_i2c_client_register, | 743 | .client_register = zoran_i2c_client_register, |