Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mauro Carvalho Chehab and committed by
Mauro Carvalho Chehab
cab462f7 0680481c

+31 -45
+2 -2
drivers/media/video/bttv-i2c.c
··· 107 107 static struct i2c_adapter bttv_i2c_adap_sw_template = { 108 108 .owner = THIS_MODULE, 109 109 .class = I2C_CLASS_TV_ANALOG, 110 - .name = "bt848", 110 + .name = "bttv", 111 111 .id = I2C_HW_B_BT848, 112 112 .client_register = attach_inform, 113 113 }; ··· 274 274 }; 275 275 276 276 static struct i2c_adapter bttv_i2c_adap_hw_template = { 277 - .owner = THIS_MODULE, 277 + .owner = THIS_MODULE, 278 278 .class = I2C_CLASS_TV_ANALOG, 279 279 .name = "bt878", 280 280 .id = I2C_HW_B_BT848 /* FIXME */,
-2
drivers/media/video/cx25840/cx25840-core.c
··· 939 939 .driver = { 940 940 .name = "cx25840", 941 941 }, 942 - 943 942 .id = I2C_DRIVERID_CX25840, 944 - 945 943 .attach_adapter = cx25840_attach_adapter, 946 944 .detach_client = cx25840_detach_client, 947 945 .command = cx25840_command,
+1
drivers/media/video/cx25840/cx25840.h
··· 20 20 #ifndef _CX25840_H_ 21 21 #define _CX25840_H_ 22 22 23 + 23 24 #include <linux/videodev2.h> 24 25 #include <linux/i2c.h> 25 26
+1 -1
drivers/media/video/ir-kbd-i2c.c
··· 279 279 280 280 static struct i2c_driver driver = { 281 281 .driver = { 282 - .name = "ir remote kbd driver", 282 + .name = "ir-kbd-i2c", 283 283 }, 284 284 .id = I2C_DRIVERID_INFRARED, 285 285 .attach_adapter = ir_probe,
-4
drivers/media/video/msp3400-driver.c
··· 106 106 107 107 /* Addresses to scan */ 108 108 static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END }; 109 - 110 109 I2C_CLIENT_INSMOD; 111 - 112 110 113 111 /* ----------------------------------------------------------------------- */ 114 112 /* functions for talking to the MSP3400C Sound processor */ ··· 973 975 client->addr = address; 974 976 client->adapter = adapter; 975 977 client->driver = &i2c_driver; 976 - client->flags = I2C_CLIENT_ALLOW_USE; 977 978 snprintf(client->name, sizeof(client->name) - 1, "msp3400"); 978 979 979 980 if (msp_reset(client) == -1) { ··· 1116 1119 .suspend = msp_suspend, 1117 1120 .resume = msp_resume, 1118 1121 }, 1119 - .owner = THIS_MODULE, 1120 1122 }; 1121 1123 1122 1124 static int __init msp3400_init_module(void)
+1 -1
drivers/media/video/saa6588.c
··· 486 486 487 487 static struct i2c_driver driver = { 488 488 .driver = { 489 - .name = "i2c saa6588 driver", 489 + .name = "saa6588", 490 490 }, 491 491 .id = -1, /* FIXME */ 492 492 .attach_adapter = saa6588_probe,
-2
drivers/media/video/saa711x.c
··· 567 567 .driver = { 568 568 .name = "saa711x", 569 569 }, 570 - 571 570 .id = I2C_DRIVERID_SAA711X, 572 - 573 571 .attach_adapter = saa711x_attach_adapter, 574 572 .detach_client = saa711x_detach_client, 575 573 .command = saa711x_command,
+5 -3
drivers/media/video/saa7134/saa6752hs.c
··· 9 9 #include <linux/poll.h> 10 10 #include <linux/i2c.h> 11 11 #include <linux/types.h> 12 - #include <linux/videodev.h> 12 + #include <linux/videodev2.h> 13 + #include <media/v4l2-common.h> 13 14 #include <linux/init.h> 14 15 #include <linux/crc32.h> 15 16 ··· 510 509 { 511 510 struct saa6752hs_state *h; 512 511 513 - printk("saa6752hs: chip found @ 0x%x\n", addr<<1); 514 512 515 513 if (NULL == (h = kmalloc(sizeof(*h), GFP_KERNEL))) 516 514 return -ENOMEM; ··· 524 524 525 525 i2c_set_clientdata(&h->client, h); 526 526 i2c_attach_client(&h->client); 527 + 528 + v4l_info(&h->client,"saa6752hs: chip found @ 0x%x\n", addr<<1); 527 529 528 530 return 0; 529 531 } ··· 600 598 601 599 static struct i2c_driver driver = { 602 600 .driver = { 603 - .name = "i2c saa6752hs MPEG encoder", 601 + .name = "saa6752hs", 604 602 }, 605 603 .id = I2C_DRIVERID_SAA6752HS, 606 604 .attach_adapter = saa6752hs_probe,
+3 -3
drivers/media/video/tda7432.c
··· 341 341 { 342 342 struct tda7432 *t = i2c_get_clientdata(client); 343 343 v4l_dbg(2,client,"In tda7432_command\n"); 344 - if (debug>1) 345 - v4l_i2c_print_ioctl(client,cmd); 344 + if (debug>1) 345 + v4l_i2c_print_ioctl(client,cmd); 346 346 347 347 switch (cmd) { 348 348 /* --- v4l ioctls --- */ ··· 489 489 490 490 static struct i2c_driver driver = { 491 491 .driver = { 492 - .name = "i2c tda7432 driver", 492 + .name = "tda7432", 493 493 }, 494 494 .id = I2C_DRIVERID_TDA7432, 495 495 .attach_adapter = tda7432_probe,
+1 -1
drivers/media/video/tda9875.c
··· 368 368 369 369 static struct i2c_driver driver = { 370 370 .driver = { 371 - .name = "i2c tda9875 driver", 371 + .name = "tda9875", 372 372 }, 373 373 .id = I2C_DRIVERID_TDA9875, 374 374 .attach_adapter = tda9875_probe,
+1 -1
drivers/media/video/tda9887.c
··· 882 882 .detach_client = tda9887_detach, 883 883 .command = tda9887_command, 884 884 .driver = { 885 - .name = "i2c tda9887 driver", 885 + .name = "tda9887", 886 886 .suspend = tda9887_suspend, 887 887 .resume = tda9887_resume, 888 888 },
+4 -4
drivers/media/video/tuner-core.c
··· 805 805 .detach_client = tuner_detach, 806 806 .command = tuner_command, 807 807 .driver = { 808 - .name = "tuner", 809 - .suspend = tuner_suspend, 810 - .resume = tuner_resume, 811 - }, 808 + .name = "tuner", 809 + .suspend = tuner_suspend, 810 + .resume = tuner_resume, 811 + }, 812 812 }; 813 813 static struct i2c_client client_template = { 814 814 .name = "(tuner unset)",
+1 -2
drivers/media/video/tvaudio.c
··· 1744 1744 return 0; 1745 1745 } 1746 1746 1747 - 1748 1747 static struct i2c_driver driver = { 1749 1748 .driver = { 1750 - .name = "generic i2c audio driver", 1749 + .name = "tvaudio", 1751 1750 }, 1752 1751 .id = I2C_DRIVERID_TVAUDIO, 1753 1752 .attach_adapter = chip_probe,
+1 -5
drivers/media/video/tvmixer.c
··· 227 227 } 228 228 229 229 static struct i2c_driver driver = { 230 - #ifdef I2C_PEC 231 230 .driver = { 232 - .name = "tv card mixer driver", 231 + .name = "tvmixer", 233 232 }, 234 - #else 235 - .name = "tv card mixer driver", 236 - #endif 237 233 .id = I2C_DRIVERID_TVMIXER, 238 234 .detach_adapter = tvmixer_adapters, 239 235 .attach_adapter = tvmixer_adapters,
+6 -7
drivers/media/video/tvp5150.c
··· 30 30 MODULE_PARM_DESC(debug, "Debug level (0-1)"); 31 31 32 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 34 i2c_adapter_id(c->adapter), c->addr , ## arg); } while (0) 35 35 #define tvp5150_dbg(num, fmt, arg...) \ 36 36 do { \ 37 37 if (debug >= num) \ 38 - printk(KERN_DEBUG "%s debug %d-%04x: " fmt, c->driver->name, \ 39 - i2c_adapter_id(c->adapter), c->addr , ## arg); \ 40 - } while (0) 38 + printk(KERN_DEBUG "%s debug %d-%04x: " fmt,\ 39 + c->driver->driver.name, \ 40 + i2c_adapter_id(c->adapter), \ 41 + c->addr , ## arg); } while (0) 41 42 42 43 /* supported controls */ 43 44 static struct v4l2_queryctrl tvp5150_qctrl[] = { ··· 1138 1137 .driver = { 1139 1138 .name = "tvp5150", 1140 1139 }, 1141 - 1142 - /* FIXME */ 1143 - .id = I2C_DRIVERID_SAA7110, 1140 + .id = I2C_DRIVERID_TVP5150, 1144 1141 1145 1142 .attach_adapter = tvp5150_attach_adapter, 1146 1143 .detach_client = tvp5150_detach_client,
+3 -5
drivers/media/video/wm8775.c
··· 237 237 .driver = { 238 238 .name = "wm8775", 239 239 }, 240 - 241 - .id = I2C_DRIVERID_WM8775, 242 - 240 + .id = I2C_DRIVERID_WM8775, 243 241 .attach_adapter = wm8775_probe, 244 - .detach_client = wm8775_detach, 245 - .command = wm8775_command, 242 + .detach_client = wm8775_detach, 243 + .command = wm8775_command, 246 244 }; 247 245 248 246
-1
include/media/tuner.h
··· 214 214 #define tuner_warn(fmt, arg...) do {\ 215 215 printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ 216 216 i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) 217 - 218 217 #define tuner_info(fmt, arg...) do {\ 219 218 printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ 220 219 i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0)
+1 -1
include/media/v4l2-common.h
··· 34 34 #define v4l_printk(level, name, adapter, addr, fmt, arg...) \ 35 35 printk(level "%s %d-%04x: " fmt, name, i2c_adapter_id(adapter), addr , ## arg) 36 36 37 - #define v4l_client_printk(level, client, fmt, arg...) \ 37 + #define v4l_client_printk(level, client, fmt, arg...) \ 38 38 v4l_printk(level, (client)->driver->driver.name, (client)->adapter, \ 39 39 (client)->addr, fmt , ## arg) 40 40