diff options
Diffstat (limited to 'drivers/media/video')
43 files changed, 148 insertions, 186 deletions
diff --git a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c index 1ca2b67aedfb..e61003de1d5f 100644 --- a/drivers/media/video/adv7170.c +++ b/drivers/media/video/adv7170.c | |||
@@ -420,7 +420,6 @@ adv7170_detect_client (struct i2c_adapter *adapter, | |||
420 | client->addr = address; | 420 | client->addr = address; |
421 | client->adapter = adapter; | 421 | client->adapter = adapter; |
422 | client->driver = &i2c_driver_adv7170; | 422 | client->driver = &i2c_driver_adv7170; |
423 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
424 | if ((client->addr == I2C_ADV7170 >> 1) || | 423 | if ((client->addr == I2C_ADV7170 >> 1) || |
425 | (client->addr == (I2C_ADV7170 >> 1) + 1)) { | 424 | (client->addr == (I2C_ADV7170 >> 1) + 1)) { |
426 | dname = adv7170_name; | 425 | dname = adv7170_name; |
@@ -498,11 +497,11 @@ adv7170_detach_client (struct i2c_client *client) | |||
498 | /* ----------------------------------------------------------------------- */ | 497 | /* ----------------------------------------------------------------------- */ |
499 | 498 | ||
500 | static struct i2c_driver i2c_driver_adv7170 = { | 499 | static struct i2c_driver i2c_driver_adv7170 = { |
501 | .owner = THIS_MODULE, | 500 | .driver = { |
502 | .name = "adv7170", /* name */ | 501 | .name = "adv7170", /* name */ |
502 | }, | ||
503 | 503 | ||
504 | .id = I2C_DRIVERID_ADV7170, | 504 | .id = I2C_DRIVERID_ADV7170, |
505 | .flags = I2C_DF_NOTIFY, | ||
506 | 505 | ||
507 | .attach_adapter = adv7170_attach_adapter, | 506 | .attach_adapter = adv7170_attach_adapter, |
508 | .detach_client = adv7170_detach_client, | 507 | .detach_client = adv7170_detach_client, |
diff --git a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c index 173bca1e0295..6d9536a71ee4 100644 --- a/drivers/media/video/adv7175.c +++ b/drivers/media/video/adv7175.c | |||
@@ -470,7 +470,6 @@ adv7175_detect_client (struct i2c_adapter *adapter, | |||
470 | client->addr = address; | 470 | client->addr = address; |
471 | client->adapter = adapter; | 471 | client->adapter = adapter; |
472 | client->driver = &i2c_driver_adv7175; | 472 | client->driver = &i2c_driver_adv7175; |
473 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
474 | if ((client->addr == I2C_ADV7175 >> 1) || | 473 | if ((client->addr == I2C_ADV7175 >> 1) || |
475 | (client->addr == (I2C_ADV7175 >> 1) + 1)) { | 474 | (client->addr == (I2C_ADV7175 >> 1) + 1)) { |
476 | dname = adv7175_name; | 475 | dname = adv7175_name; |
@@ -548,11 +547,11 @@ adv7175_detach_client (struct i2c_client *client) | |||
548 | /* ----------------------------------------------------------------------- */ | 547 | /* ----------------------------------------------------------------------- */ |
549 | 548 | ||
550 | static struct i2c_driver i2c_driver_adv7175 = { | 549 | static struct i2c_driver i2c_driver_adv7175 = { |
551 | .owner = THIS_MODULE, | 550 | .driver = { |
552 | .name = "adv7175", /* name */ | 551 | .name = "adv7175", /* name */ |
552 | }, | ||
553 | 553 | ||
554 | .id = I2C_DRIVERID_ADV7175, | 554 | .id = I2C_DRIVERID_ADV7175, |
555 | .flags = I2C_DF_NOTIFY, | ||
556 | 555 | ||
557 | .attach_adapter = adv7175_attach_adapter, | 556 | .attach_adapter = adv7175_attach_adapter, |
558 | .detach_client = adv7175_detach_client, | 557 | .detach_client = adv7175_detach_client, |
diff --git a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c index 3ee0afca76a7..560b99891753 100644 --- a/drivers/media/video/bt819.c +++ b/drivers/media/video/bt819.c | |||
@@ -535,7 +535,6 @@ bt819_detect_client (struct i2c_adapter *adapter, | |||
535 | client->addr = address; | 535 | client->addr = address; |
536 | client->adapter = adapter; | 536 | client->adapter = adapter; |
537 | client->driver = &i2c_driver_bt819; | 537 | client->driver = &i2c_driver_bt819; |
538 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
539 | 538 | ||
540 | decoder = kmalloc(sizeof(struct bt819), GFP_KERNEL); | 539 | decoder = kmalloc(sizeof(struct bt819), GFP_KERNEL); |
541 | if (decoder == NULL) { | 540 | if (decoder == NULL) { |
@@ -623,11 +622,11 @@ bt819_detach_client (struct i2c_client *client) | |||
623 | /* ----------------------------------------------------------------------- */ | 622 | /* ----------------------------------------------------------------------- */ |
624 | 623 | ||
625 | static struct i2c_driver i2c_driver_bt819 = { | 624 | static struct i2c_driver i2c_driver_bt819 = { |
626 | .owner = THIS_MODULE, | 625 | .driver = { |
627 | .name = "bt819", | 626 | .name = "bt819", |
627 | }, | ||
628 | 628 | ||
629 | .id = I2C_DRIVERID_BT819, | 629 | .id = I2C_DRIVERID_BT819, |
630 | .flags = I2C_DF_NOTIFY, | ||
631 | 630 | ||
632 | .attach_adapter = bt819_attach_adapter, | 631 | .attach_adapter = bt819_attach_adapter, |
633 | .detach_client = bt819_detach_client, | 632 | .detach_client = bt819_detach_client, |
diff --git a/drivers/media/video/bt832.c b/drivers/media/video/bt832.c index 3ca1d768bfd3..1c3ff5f38a6d 100644 --- a/drivers/media/video/bt832.c +++ b/drivers/media/video/bt832.c | |||
@@ -230,10 +230,10 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
230 | /* ----------------------------------------------------------------------- */ | 230 | /* ----------------------------------------------------------------------- */ |
231 | 231 | ||
232 | static struct i2c_driver driver = { | 232 | static struct i2c_driver driver = { |
233 | .owner = THIS_MODULE, | 233 | .driver = { |
234 | .name = "i2c bt832 driver", | 234 | .name = "i2c bt832 driver", |
235 | }, | ||
235 | .id = -1, /* FIXME */ | 236 | .id = -1, /* FIXME */ |
236 | .flags = I2C_DF_NOTIFY, | ||
237 | .attach_adapter = bt832_probe, | 237 | .attach_adapter = bt832_probe, |
238 | .detach_client = bt832_detach, | 238 | .detach_client = bt832_detach, |
239 | .command = bt832_command, | 239 | .command = bt832_command, |
@@ -241,7 +241,6 @@ static struct i2c_driver driver = { | |||
241 | static struct i2c_client client_template = | 241 | static struct i2c_client client_template = |
242 | { | 242 | { |
243 | .name = "bt832", | 243 | .name = "bt832", |
244 | .flags = I2C_CLIENT_ALLOW_USE, | ||
245 | .driver = &driver, | 244 | .driver = &driver, |
246 | }; | 245 | }; |
247 | 246 | ||
diff --git a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c index 8eb871d0e85b..60508069bbed 100644 --- a/drivers/media/video/bt856.c +++ b/drivers/media/video/bt856.c | |||
@@ -323,7 +323,6 @@ bt856_detect_client (struct i2c_adapter *adapter, | |||
323 | client->addr = address; | 323 | client->addr = address; |
324 | client->adapter = adapter; | 324 | client->adapter = adapter; |
325 | client->driver = &i2c_driver_bt856; | 325 | client->driver = &i2c_driver_bt856; |
326 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
327 | strlcpy(I2C_NAME(client), "bt856", sizeof(I2C_NAME(client))); | 326 | strlcpy(I2C_NAME(client), "bt856", sizeof(I2C_NAME(client))); |
328 | 327 | ||
329 | encoder = kmalloc(sizeof(struct bt856), GFP_KERNEL); | 328 | encoder = kmalloc(sizeof(struct bt856), GFP_KERNEL); |
@@ -405,11 +404,11 @@ bt856_detach_client (struct i2c_client *client) | |||
405 | /* ----------------------------------------------------------------------- */ | 404 | /* ----------------------------------------------------------------------- */ |
406 | 405 | ||
407 | static struct i2c_driver i2c_driver_bt856 = { | 406 | static struct i2c_driver i2c_driver_bt856 = { |
408 | .owner = THIS_MODULE, | 407 | .driver = { |
409 | .name = "bt856", | 408 | .name = "bt856", |
409 | }, | ||
410 | 410 | ||
411 | .id = I2C_DRIVERID_BT856, | 411 | .id = I2C_DRIVERID_BT856, |
412 | .flags = I2C_DF_NOTIFY, | ||
413 | 412 | ||
414 | .attach_adapter = bt856_attach_adapter, | 413 | .attach_adapter = bt856_attach_adapter, |
415 | .detach_client = bt856_detach_client, | 414 | .detach_client = bt856_detach_client, |
diff --git a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c index 77619eb131f6..d6418c023d39 100644 --- a/drivers/media/video/bttv-i2c.c +++ b/drivers/media/video/bttv-i2c.c | |||
@@ -300,7 +300,7 @@ static int attach_inform(struct i2c_client *client) | |||
300 | 300 | ||
301 | if (bttv_debug) | 301 | if (bttv_debug) |
302 | printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n", | 302 | printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n", |
303 | btv->c.nr,client->driver->name,client->addr, | 303 | btv->c.nr, client->driver->driver.name, client->addr, |
304 | client->name); | 304 | client->name); |
305 | if (!client->driver->command) | 305 | if (!client->driver->command) |
306 | return 0; | 306 | return 0; |
diff --git a/drivers/media/video/cs53l32a.c b/drivers/media/video/cs53l32a.c index 780b352ec119..643ead1a87ee 100644 --- a/drivers/media/video/cs53l32a.c +++ b/drivers/media/video/cs53l32a.c | |||
@@ -42,15 +42,16 @@ MODULE_PARM_DESC(debug, "Debugging messages\n\t\t\t0=Off (default), 1=On"); | |||
42 | #define cs53l32a_dbg(fmt, arg...) \ | 42 | #define cs53l32a_dbg(fmt, arg...) \ |
43 | do { \ | 43 | do { \ |
44 | if (debug) \ | 44 | if (debug) \ |
45 | printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \ | 45 | printk(KERN_INFO "%s debug %d-%04x: " fmt, \ |
46 | client->driver->driver.name, \ | ||
46 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ | 47 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ |
47 | } while (0) | 48 | } while (0) |
48 | 49 | ||
49 | #define cs53l32a_err(fmt, arg...) do { \ | 50 | #define cs53l32a_err(fmt, arg...) do { \ |
50 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \ | 51 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \ |
51 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 52 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
52 | #define cs53l32a_info(fmt, arg...) do { \ | 53 | #define cs53l32a_info(fmt, arg...) do { \ |
53 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \ | 54 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ |
54 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 55 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
55 | 56 | ||
56 | static unsigned short normal_i2c[] = { 0x22 >> 1, I2C_CLIENT_END }; | 57 | static unsigned short normal_i2c[] = { 0x22 >> 1, I2C_CLIENT_END }; |
@@ -154,7 +155,6 @@ static int cs53l32a_attach(struct i2c_adapter *adapter, int address, int kind) | |||
154 | client->addr = address; | 155 | client->addr = address; |
155 | client->adapter = adapter; | 156 | client->adapter = adapter; |
156 | client->driver = &i2c_driver; | 157 | client->driver = &i2c_driver; |
157 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
158 | snprintf(client->name, sizeof(client->name) - 1, "cs53l32a"); | 158 | snprintf(client->name, sizeof(client->name) - 1, "cs53l32a"); |
159 | 159 | ||
160 | cs53l32a_info("chip found @ 0x%x (%s)\n", address << 1, adapter->name); | 160 | cs53l32a_info("chip found @ 0x%x (%s)\n", address << 1, adapter->name); |
@@ -216,13 +216,13 @@ static int cs53l32a_detach(struct i2c_client *client) | |||
216 | 216 | ||
217 | /* i2c implementation */ | 217 | /* i2c implementation */ |
218 | static struct i2c_driver i2c_driver = { | 218 | static struct i2c_driver i2c_driver = { |
219 | .name = "cs53l32a", | 219 | .driver = { |
220 | .name = "cs53l32a", | ||
221 | }, | ||
220 | .id = I2C_DRIVERID_CS53L32A, | 222 | .id = I2C_DRIVERID_CS53L32A, |
221 | .flags = I2C_DF_NOTIFY, | ||
222 | .attach_adapter = cs53l32a_probe, | 223 | .attach_adapter = cs53l32a_probe, |
223 | .detach_client = cs53l32a_detach, | 224 | .detach_client = cs53l32a_detach, |
224 | .command = cs53l32a_command, | 225 | .command = cs53l32a_command, |
225 | .owner = THIS_MODULE, | ||
226 | }; | 226 | }; |
227 | 227 | ||
228 | 228 | ||
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 5b93723a1768..3b09f46dddf6 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -773,7 +773,6 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, | |||
773 | client->addr = address; | 773 | client->addr = address; |
774 | client->adapter = adapter; | 774 | client->adapter = adapter; |
775 | client->driver = &i2c_driver_cx25840; | 775 | client->driver = &i2c_driver_cx25840; |
776 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
777 | snprintf(client->name, sizeof(client->name) - 1, "cx25840"); | 776 | snprintf(client->name, sizeof(client->name) - 1, "cx25840"); |
778 | 777 | ||
779 | cx25840_dbg("detecting cx25840 client on address 0x%x\n", address << 1); | 778 | cx25840_dbg("detecting cx25840 client on address 0x%x\n", address << 1); |
@@ -844,15 +843,15 @@ static int cx25840_detach_client(struct i2c_client *client) | |||
844 | /* ----------------------------------------------------------------------- */ | 843 | /* ----------------------------------------------------------------------- */ |
845 | 844 | ||
846 | static struct i2c_driver i2c_driver_cx25840 = { | 845 | static struct i2c_driver i2c_driver_cx25840 = { |
847 | .name = "cx25840", | 846 | .driver = { |
847 | .name = "cx25840", | ||
848 | }, | ||
848 | 849 | ||
849 | .id = I2C_DRIVERID_CX25840, | 850 | .id = I2C_DRIVERID_CX25840, |
850 | .flags = I2C_DF_NOTIFY, | ||
851 | 851 | ||
852 | .attach_adapter = cx25840_attach_adapter, | 852 | .attach_adapter = cx25840_attach_adapter, |
853 | .detach_client = cx25840_detach_client, | 853 | .detach_client = cx25840_detach_client, |
854 | .command = cx25840_command, | 854 | .command = cx25840_command, |
855 | .owner = THIS_MODULE, | ||
856 | }; | 855 | }; |
857 | 856 | ||
858 | 857 | ||
diff --git a/drivers/media/video/cx25840/cx25840.h b/drivers/media/video/cx25840/cx25840.h index 4932ed1c9b19..40aa59f9c525 100644 --- a/drivers/media/video/cx25840/cx25840.h +++ b/drivers/media/video/cx25840/cx25840.h | |||
@@ -27,15 +27,16 @@ | |||
27 | extern int cx25840_debug; | 27 | extern int cx25840_debug; |
28 | 28 | ||
29 | #define cx25840_dbg(fmt, arg...) do { if (cx25840_debug) \ | 29 | #define cx25840_dbg(fmt, arg...) do { if (cx25840_debug) \ |
30 | printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \ | 30 | printk(KERN_INFO "%s debug %d-%04x: " fmt, \ |
31 | client->driver->driver.name, \ | ||
31 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 32 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
32 | 33 | ||
33 | #define cx25840_err(fmt, arg...) do { \ | 34 | #define cx25840_err(fmt, arg...) do { \ |
34 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \ | 35 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \ |
35 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 36 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
36 | 37 | ||
37 | #define cx25840_info(fmt, arg...) do { \ | 38 | #define cx25840_info(fmt, arg...) do { \ |
38 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \ | 39 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ |
39 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 40 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
40 | 41 | ||
41 | #define CX25840_CID_CARDTYPE (V4L2_CID_PRIVATE_BASE+0) | 42 | #define CX25840_CID_CARDTYPE (V4L2_CID_PRIVATE_BASE+0) |
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index 9790d412f192..4a8fb161b16a 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c | |||
@@ -94,7 +94,7 @@ static int attach_inform(struct i2c_client *client) | |||
94 | struct cx88_core *core = i2c_get_adapdata(client->adapter); | 94 | struct cx88_core *core = i2c_get_adapdata(client->adapter); |
95 | 95 | ||
96 | dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n", | 96 | dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n", |
97 | client->driver->name, client->addr, client->name); | 97 | client->driver->driver.name, client->addr, client->name); |
98 | if (!client->driver->command) | 98 | if (!client->driver->command) |
99 | return 0; | 99 | return 0; |
100 | 100 | ||
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index 7f5603054f02..d14bcf4ceaea 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c | |||
@@ -497,7 +497,6 @@ static struct i2c_adapter em28xx_adap_template = { | |||
497 | 497 | ||
498 | static struct i2c_client em28xx_client_template = { | 498 | static struct i2c_client em28xx_client_template = { |
499 | .name = "em28xx internal", | 499 | .name = "em28xx internal", |
500 | .flags = I2C_CLIENT_ALLOW_USE, | ||
501 | }; | 500 | }; |
502 | 501 | ||
503 | /* ----------------------------------------------------------- */ | 502 | /* ----------------------------------------------------------- */ |
diff --git a/drivers/media/video/indycam.c b/drivers/media/video/indycam.c index deeef125eb92..bb5cbecffcc3 100644 --- a/drivers/media/video/indycam.c +++ b/drivers/media/video/indycam.c | |||
@@ -451,10 +451,10 @@ static int indycam_command(struct i2c_client *client, unsigned int cmd, | |||
451 | } | 451 | } |
452 | 452 | ||
453 | static struct i2c_driver i2c_driver_indycam = { | 453 | static struct i2c_driver i2c_driver_indycam = { |
454 | .owner = THIS_MODULE, | 454 | .driver = { |
455 | .name = "indycam", | 455 | .name = "indycam", |
456 | }, | ||
456 | .id = I2C_DRIVERID_INDYCAM, | 457 | .id = I2C_DRIVERID_INDYCAM, |
457 | .flags = I2C_DF_NOTIFY, | ||
458 | .attach_adapter = indycam_probe, | 458 | .attach_adapter = indycam_probe, |
459 | .detach_client = indycam_detach, | 459 | .detach_client = indycam_detach, |
460 | .command = indycam_command, | 460 | .command = indycam_command, |
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 740e543311af..3cc1d6a6019b 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -278,9 +278,10 @@ static int ir_detach(struct i2c_client *client); | |||
278 | static int ir_probe(struct i2c_adapter *adap); | 278 | static int ir_probe(struct i2c_adapter *adap); |
279 | 279 | ||
280 | static struct i2c_driver driver = { | 280 | static struct i2c_driver driver = { |
281 | .name = "ir remote kbd driver", | 281 | .driver = { |
282 | .name = "ir remote kbd driver", | ||
283 | }, | ||
282 | .id = I2C_DRIVERID_INFRARED, | 284 | .id = I2C_DRIVERID_INFRARED, |
283 | .flags = I2C_DF_NOTIFY, | ||
284 | .attach_adapter = ir_probe, | 285 | .attach_adapter = ir_probe, |
285 | .detach_client = ir_detach, | 286 | .detach_client = ir_detach, |
286 | }; | 287 | }; |
diff --git a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c index d86f8e92e534..183253e2dd91 100644 --- a/drivers/media/video/msp3400.c +++ b/drivers/media/video/msp3400.c | |||
@@ -59,7 +59,8 @@ | |||
59 | #define msp3400_dbg(fmt, arg...) \ | 59 | #define msp3400_dbg(fmt, arg...) \ |
60 | do { \ | 60 | do { \ |
61 | if (debug) \ | 61 | if (debug) \ |
62 | printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \ | 62 | printk(KERN_INFO "%s debug %d-%04x: " fmt, \ |
63 | client->driver->driver.name, \ | ||
63 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ | 64 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ |
64 | } while (0) | 65 | } while (0) |
65 | 66 | ||
@@ -67,7 +68,8 @@ | |||
67 | #define msp3400_dbg_mediumvol(fmt, arg...) \ | 68 | #define msp3400_dbg_mediumvol(fmt, arg...) \ |
68 | do { \ | 69 | do { \ |
69 | if (debug >= 2) \ | 70 | if (debug >= 2) \ |
70 | printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \ | 71 | printk(KERN_INFO "%s debug %d-%04x: " fmt, \ |
72 | client->driver->driver.name, \ | ||
71 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ | 73 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ |
72 | } while (0) | 74 | } while (0) |
73 | 75 | ||
@@ -75,18 +77,19 @@ | |||
75 | #define msp3400_dbg_highvol(fmt, arg...) \ | 77 | #define msp3400_dbg_highvol(fmt, arg...) \ |
76 | do { \ | 78 | do { \ |
77 | if (debug >= 16) \ | 79 | if (debug >= 16) \ |
78 | printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \ | 80 | printk(KERN_INFO "%s debug %d-%04x: " fmt, \ |
81 | client->driver->driver.name, \ | ||
79 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ | 82 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ |
80 | } while (0) | 83 | } while (0) |
81 | 84 | ||
82 | #define msp3400_err(fmt, arg...) do { \ | 85 | #define msp3400_err(fmt, arg...) do { \ |
83 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \ | 86 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \ |
84 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 87 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
85 | #define msp3400_warn(fmt, arg...) do { \ | 88 | #define msp3400_warn(fmt, arg...) do { \ |
86 | printk(KERN_WARNING "%s %d-%04x: " fmt, client->driver->name, \ | 89 | printk(KERN_WARNING "%s %d-%04x: " fmt, client->driver->driver.name, \ |
87 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 90 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
88 | #define msp3400_info(fmt, arg...) do { \ | 91 | #define msp3400_info(fmt, arg...) do { \ |
89 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \ | 92 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ |
90 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 93 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
91 | 94 | ||
92 | #define OPMODE_AUTO -1 | 95 | #define OPMODE_AUTO -1 |
@@ -1561,14 +1564,12 @@ static int msp_resume(struct device * dev); | |||
1561 | static void msp_wake_thread(struct i2c_client *client); | 1564 | static void msp_wake_thread(struct i2c_client *client); |
1562 | 1565 | ||
1563 | static struct i2c_driver driver = { | 1566 | static struct i2c_driver driver = { |
1564 | .owner = THIS_MODULE, | ||
1565 | .name = "msp3400", | ||
1566 | .id = I2C_DRIVERID_MSP3400, | 1567 | .id = I2C_DRIVERID_MSP3400, |
1567 | .flags = I2C_DF_NOTIFY, | ||
1568 | .attach_adapter = msp_probe, | 1568 | .attach_adapter = msp_probe, |
1569 | .detach_client = msp_detach, | 1569 | .detach_client = msp_detach, |
1570 | .command = msp_command, | 1570 | .command = msp_command, |
1571 | .driver = { | 1571 | .driver = { |
1572 | .name = "i2c msp3400 driver", | ||
1572 | .suspend = msp_suspend, | 1573 | .suspend = msp_suspend, |
1573 | .resume = msp_resume, | 1574 | .resume = msp_resume, |
1574 | }, | 1575 | }, |
@@ -1577,7 +1578,6 @@ static struct i2c_driver driver = { | |||
1577 | static struct i2c_client client_template = | 1578 | static struct i2c_client client_template = |
1578 | { | 1579 | { |
1579 | .name = "(unset)", | 1580 | .name = "(unset)", |
1580 | .flags = I2C_CLIENT_ALLOW_USE, | ||
1581 | .driver = &driver, | 1581 | .driver = &driver, |
1582 | }; | 1582 | }; |
1583 | 1583 | ||
diff --git a/drivers/media/video/ovcamchip/ovcamchip_core.c b/drivers/media/video/ovcamchip/ovcamchip_core.c index 2de34ebf0673..428f1bb75ec3 100644 --- a/drivers/media/video/ovcamchip/ovcamchip_core.c +++ b/drivers/media/video/ovcamchip/ovcamchip_core.c | |||
@@ -410,11 +410,11 @@ static int ovcamchip_command(struct i2c_client *c, unsigned int cmd, void *arg) | |||
410 | /* ----------------------------------------------------------------------- */ | 410 | /* ----------------------------------------------------------------------- */ |
411 | 411 | ||
412 | static struct i2c_driver driver = { | 412 | static struct i2c_driver driver = { |
413 | .owner = THIS_MODULE, | 413 | .driver = { |
414 | .name = "ovcamchip", | 414 | .name = "ovcamchip", |
415 | }, | ||
415 | .id = I2C_DRIVERID_OVCAMCHIP, | 416 | .id = I2C_DRIVERID_OVCAMCHIP, |
416 | .class = I2C_CLASS_CAM_DIGITAL, | 417 | .class = I2C_CLASS_CAM_DIGITAL, |
417 | .flags = I2C_DF_NOTIFY, | ||
418 | .attach_adapter = ovcamchip_attach, | 418 | .attach_adapter = ovcamchip_attach, |
419 | .detach_client = ovcamchip_detach, | 419 | .detach_client = ovcamchip_detach, |
420 | .command = ovcamchip_command, | 420 | .command = ovcamchip_command, |
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index b8054da31ffd..0aa9e72f632c 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c | |||
@@ -151,25 +151,18 @@ static int saa5246a_detach(struct i2c_client *client) | |||
151 | return 0; | 151 | return 0; |
152 | } | 152 | } |
153 | 153 | ||
154 | static int saa5246a_command(struct i2c_client *device, unsigned int cmd, | ||
155 | void *arg) | ||
156 | { | ||
157 | return -EINVAL; | ||
158 | } | ||
159 | |||
160 | /* | 154 | /* |
161 | * I2C interfaces | 155 | * I2C interfaces |
162 | */ | 156 | */ |
163 | 157 | ||
164 | static struct i2c_driver i2c_driver_videotext = | 158 | static struct i2c_driver i2c_driver_videotext = |
165 | { | 159 | { |
166 | .owner = THIS_MODULE, | 160 | .driver = { |
167 | .name = IF_NAME, /* name */ | 161 | .name = IF_NAME, /* name */ |
162 | }, | ||
168 | .id = I2C_DRIVERID_SAA5249, /* in i2c.h */ | 163 | .id = I2C_DRIVERID_SAA5249, /* in i2c.h */ |
169 | .flags = I2C_DF_NOTIFY, | ||
170 | .attach_adapter = saa5246a_probe, | 164 | .attach_adapter = saa5246a_probe, |
171 | .detach_client = saa5246a_detach, | 165 | .detach_client = saa5246a_detach, |
172 | .command = saa5246a_command | ||
173 | }; | 166 | }; |
174 | 167 | ||
175 | static struct i2c_client client_template = { | 168 | static struct i2c_client client_template = { |
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 7ffa2e9a9bf3..a51c7bd96618 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c | |||
@@ -226,23 +226,16 @@ static int saa5249_detach(struct i2c_client *client) | |||
226 | return 0; | 226 | return 0; |
227 | } | 227 | } |
228 | 228 | ||
229 | static int saa5249_command(struct i2c_client *device, | ||
230 | unsigned int cmd, void *arg) | ||
231 | { | ||
232 | return -EINVAL; | ||
233 | } | ||
234 | |||
235 | /* new I2C driver support */ | 229 | /* new I2C driver support */ |
236 | 230 | ||
237 | static struct i2c_driver i2c_driver_videotext = | 231 | static struct i2c_driver i2c_driver_videotext = |
238 | { | 232 | { |
239 | .owner = THIS_MODULE, | 233 | .driver = { |
240 | .name = IF_NAME, /* name */ | 234 | .name = IF_NAME, /* name */ |
235 | }, | ||
241 | .id = I2C_DRIVERID_SAA5249, /* in i2c.h */ | 236 | .id = I2C_DRIVERID_SAA5249, /* in i2c.h */ |
242 | .flags = I2C_DF_NOTIFY, | ||
243 | .attach_adapter = saa5249_probe, | 237 | .attach_adapter = saa5249_probe, |
244 | .detach_client = saa5249_detach, | 238 | .detach_client = saa5249_detach, |
245 | .command = saa5249_command | ||
246 | }; | 239 | }; |
247 | 240 | ||
248 | static struct i2c_client client_template = { | 241 | static struct i2c_client client_template = { |
diff --git a/drivers/media/video/saa6588.c b/drivers/media/video/saa6588.c index 923322503e8f..d60a783e0473 100644 --- a/drivers/media/video/saa6588.c +++ b/drivers/media/video/saa6588.c | |||
@@ -495,10 +495,10 @@ static int saa6588_command(struct i2c_client *client, unsigned int cmd, | |||
495 | /* ----------------------------------------------------------------------- */ | 495 | /* ----------------------------------------------------------------------- */ |
496 | 496 | ||
497 | static struct i2c_driver driver = { | 497 | static struct i2c_driver driver = { |
498 | .owner = THIS_MODULE, | 498 | .driver = { |
499 | .name = "i2c saa6588 driver", | 499 | .name = "i2c saa6588 driver", |
500 | }, | ||
500 | .id = -1, /* FIXME */ | 501 | .id = -1, /* FIXME */ |
501 | .flags = I2C_DF_NOTIFY, | ||
502 | .attach_adapter = saa6588_probe, | 502 | .attach_adapter = saa6588_probe, |
503 | .detach_client = saa6588_detach, | 503 | .detach_client = saa6588_detach, |
504 | .command = saa6588_command, | 504 | .command = saa6588_command, |
@@ -506,7 +506,6 @@ static struct i2c_driver driver = { | |||
506 | 506 | ||
507 | static struct i2c_client client_template = { | 507 | static struct i2c_client client_template = { |
508 | .name = "saa6588", | 508 | .name = "saa6588", |
509 | .flags = I2C_CLIENT_ALLOW_USE, | ||
510 | .driver = &driver, | 509 | .driver = &driver, |
511 | }; | 510 | }; |
512 | 511 | ||
diff --git a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c index e116bdbed310..619ff0b7a1ff 100644 --- a/drivers/media/video/saa7110.c +++ b/drivers/media/video/saa7110.c | |||
@@ -501,7 +501,6 @@ saa7110_detect_client (struct i2c_adapter *adapter, | |||
501 | client->addr = address; | 501 | client->addr = address; |
502 | client->adapter = adapter; | 502 | client->adapter = adapter; |
503 | client->driver = &i2c_driver_saa7110; | 503 | client->driver = &i2c_driver_saa7110; |
504 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
505 | strlcpy(I2C_NAME(client), "saa7110", sizeof(I2C_NAME(client))); | 504 | strlcpy(I2C_NAME(client), "saa7110", sizeof(I2C_NAME(client))); |
506 | 505 | ||
507 | decoder = kmalloc(sizeof(struct saa7110), GFP_KERNEL); | 506 | decoder = kmalloc(sizeof(struct saa7110), GFP_KERNEL); |
@@ -587,11 +586,11 @@ saa7110_detach_client (struct i2c_client *client) | |||
587 | /* ----------------------------------------------------------------------- */ | 586 | /* ----------------------------------------------------------------------- */ |
588 | 587 | ||
589 | static struct i2c_driver i2c_driver_saa7110 = { | 588 | static struct i2c_driver i2c_driver_saa7110 = { |
590 | .owner = THIS_MODULE, | 589 | .driver = { |
591 | .name = "saa7110", | 590 | .name = "saa7110", |
591 | }, | ||
592 | 592 | ||
593 | .id = I2C_DRIVERID_SAA7110, | 593 | .id = I2C_DRIVERID_SAA7110, |
594 | .flags = I2C_DF_NOTIFY, | ||
595 | 594 | ||
596 | .attach_adapter = saa7110_attach_adapter, | 595 | .attach_adapter = saa7110_attach_adapter, |
597 | .detach_client = saa7110_detach_client, | 596 | .detach_client = saa7110_detach_client, |
diff --git a/drivers/media/video/saa7111.c b/drivers/media/video/saa7111.c index fe8a5e453969..acaeee592b54 100644 --- a/drivers/media/video/saa7111.c +++ b/drivers/media/video/saa7111.c | |||
@@ -518,7 +518,6 @@ saa7111_detect_client (struct i2c_adapter *adapter, | |||
518 | client->addr = address; | 518 | client->addr = address; |
519 | client->adapter = adapter; | 519 | client->adapter = adapter; |
520 | client->driver = &i2c_driver_saa7111; | 520 | client->driver = &i2c_driver_saa7111; |
521 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
522 | strlcpy(I2C_NAME(client), "saa7111", sizeof(I2C_NAME(client))); | 521 | strlcpy(I2C_NAME(client), "saa7111", sizeof(I2C_NAME(client))); |
523 | 522 | ||
524 | decoder = kmalloc(sizeof(struct saa7111), GFP_KERNEL); | 523 | decoder = kmalloc(sizeof(struct saa7111), GFP_KERNEL); |
@@ -590,11 +589,11 @@ saa7111_detach_client (struct i2c_client *client) | |||
590 | /* ----------------------------------------------------------------------- */ | 589 | /* ----------------------------------------------------------------------- */ |
591 | 590 | ||
592 | static struct i2c_driver i2c_driver_saa7111 = { | 591 | static struct i2c_driver i2c_driver_saa7111 = { |
593 | .owner = THIS_MODULE, | 592 | .driver = { |
594 | .name = "saa7111", | 593 | .name = "saa7111", |
594 | }, | ||
595 | 595 | ||
596 | .id = I2C_DRIVERID_SAA7111A, | 596 | .id = I2C_DRIVERID_SAA7111A, |
597 | .flags = I2C_DF_NOTIFY, | ||
598 | 597 | ||
599 | .attach_adapter = saa7111_attach_adapter, | 598 | .attach_adapter = saa7111_attach_adapter, |
600 | .detach_client = saa7111_detach_client, | 599 | .detach_client = saa7111_detach_client, |
diff --git a/drivers/media/video/saa7114.c b/drivers/media/video/saa7114.c index d9f50e2f7b92..b7ac0122f729 100644 --- a/drivers/media/video/saa7114.c +++ b/drivers/media/video/saa7114.c | |||
@@ -859,7 +859,6 @@ saa7114_detect_client (struct i2c_adapter *adapter, | |||
859 | client->addr = address; | 859 | client->addr = address; |
860 | client->adapter = adapter; | 860 | client->adapter = adapter; |
861 | client->driver = &i2c_driver_saa7114; | 861 | client->driver = &i2c_driver_saa7114; |
862 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
863 | strlcpy(I2C_NAME(client), "saa7114", sizeof(I2C_NAME(client))); | 862 | strlcpy(I2C_NAME(client), "saa7114", sizeof(I2C_NAME(client))); |
864 | 863 | ||
865 | decoder = kmalloc(sizeof(struct saa7114), GFP_KERNEL); | 864 | decoder = kmalloc(sizeof(struct saa7114), GFP_KERNEL); |
@@ -1204,11 +1203,11 @@ saa7114_detach_client (struct i2c_client *client) | |||
1204 | /* ----------------------------------------------------------------------- */ | 1203 | /* ----------------------------------------------------------------------- */ |
1205 | 1204 | ||
1206 | static struct i2c_driver i2c_driver_saa7114 = { | 1205 | static struct i2c_driver i2c_driver_saa7114 = { |
1207 | .owner = THIS_MODULE, | 1206 | .driver = { |
1208 | .name = "saa7114", | 1207 | .name = "saa7114", |
1208 | }, | ||
1209 | 1209 | ||
1210 | .id = I2C_DRIVERID_SAA7114, | 1210 | .id = I2C_DRIVERID_SAA7114, |
1211 | .flags = I2C_DF_NOTIFY, | ||
1212 | 1211 | ||
1213 | .attach_adapter = saa7114_attach_adapter, | 1212 | .attach_adapter = saa7114_attach_adapter, |
1214 | .detach_client = saa7114_detach_client, | 1213 | .detach_client = saa7114_detach_client, |
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index e717e30d8187..29e28c742cd4 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -52,15 +52,16 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); | |||
52 | #define saa7115_dbg(fmt,arg...) \ | 52 | #define saa7115_dbg(fmt,arg...) \ |
53 | do { \ | 53 | do { \ |
54 | if (debug) \ | 54 | if (debug) \ |
55 | printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \ | 55 | printk(KERN_INFO "%s debug %d-%04x: " fmt, \ |
56 | client->driver->driver.name, \ | ||
56 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ | 57 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ |
57 | } while (0) | 58 | } while (0) |
58 | 59 | ||
59 | #define saa7115_err(fmt, arg...) do { \ | 60 | #define saa7115_err(fmt, arg...) do { \ |
60 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \ | 61 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \ |
61 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 62 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
62 | #define saa7115_info(fmt, arg...) do { \ | 63 | #define saa7115_info(fmt, arg...) do { \ |
63 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \ | 64 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ |
64 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 65 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
65 | 66 | ||
66 | static unsigned short normal_i2c[] = { 0x42 >> 1, 0x40 >> 1, I2C_CLIENT_END }; | 67 | static unsigned short normal_i2c[] = { 0x42 >> 1, 0x40 >> 1, I2C_CLIENT_END }; |
@@ -1270,7 +1271,6 @@ static int saa7115_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1270 | client->addr = address; | 1271 | client->addr = address; |
1271 | client->adapter = adapter; | 1272 | client->adapter = adapter; |
1272 | client->driver = &i2c_driver_saa7115; | 1273 | client->driver = &i2c_driver_saa7115; |
1273 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
1274 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); | 1274 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); |
1275 | 1275 | ||
1276 | saa7115_dbg("detecting saa7115 client on address 0x%x\n", address << 1); | 1276 | saa7115_dbg("detecting saa7115 client on address 0x%x\n", address << 1); |
@@ -1354,13 +1354,13 @@ static int saa7115_detach(struct i2c_client *client) | |||
1354 | 1354 | ||
1355 | /* i2c implementation */ | 1355 | /* i2c implementation */ |
1356 | static struct i2c_driver i2c_driver_saa7115 = { | 1356 | static struct i2c_driver i2c_driver_saa7115 = { |
1357 | .name = "saa7115", | 1357 | .driver = { |
1358 | .name = "saa7115", | ||
1359 | }, | ||
1358 | .id = I2C_DRIVERID_SAA711X, | 1360 | .id = I2C_DRIVERID_SAA711X, |
1359 | .flags = I2C_DF_NOTIFY, | ||
1360 | .attach_adapter = saa7115_probe, | 1361 | .attach_adapter = saa7115_probe, |
1361 | .detach_client = saa7115_detach, | 1362 | .detach_client = saa7115_detach, |
1362 | .command = saa7115_command, | 1363 | .command = saa7115_command, |
1363 | .owner = THIS_MODULE, | ||
1364 | }; | 1364 | }; |
1365 | 1365 | ||
1366 | 1366 | ||
diff --git a/drivers/media/video/saa711x.c b/drivers/media/video/saa711x.c index 31f7b950b01c..8008537391b5 100644 --- a/drivers/media/video/saa711x.c +++ b/drivers/media/video/saa711x.c | |||
@@ -494,7 +494,6 @@ saa711x_detect_client (struct i2c_adapter *adapter, | |||
494 | client->addr = address; | 494 | client->addr = address; |
495 | client->adapter = adapter; | 495 | client->adapter = adapter; |
496 | client->driver = &i2c_driver_saa711x; | 496 | client->driver = &i2c_driver_saa711x; |
497 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
498 | strlcpy(I2C_NAME(client), "saa711x", sizeof(I2C_NAME(client))); | 497 | strlcpy(I2C_NAME(client), "saa711x", sizeof(I2C_NAME(client))); |
499 | decoder = kmalloc(sizeof(struct saa711x), GFP_KERNEL); | 498 | decoder = kmalloc(sizeof(struct saa711x), GFP_KERNEL); |
500 | if (decoder == NULL) { | 499 | if (decoder == NULL) { |
@@ -565,11 +564,11 @@ saa711x_detach_client (struct i2c_client *client) | |||
565 | /* ----------------------------------------------------------------------- */ | 564 | /* ----------------------------------------------------------------------- */ |
566 | 565 | ||
567 | static struct i2c_driver i2c_driver_saa711x = { | 566 | static struct i2c_driver i2c_driver_saa711x = { |
568 | .owner = THIS_MODULE, | 567 | .driver = { |
569 | .name = "saa711x", | 568 | .name = "saa711x", |
569 | }, | ||
570 | 570 | ||
571 | .id = I2C_DRIVERID_SAA711X, | 571 | .id = I2C_DRIVERID_SAA711X, |
572 | .flags = I2C_DF_NOTIFY, | ||
573 | 572 | ||
574 | .attach_adapter = saa711x_attach_adapter, | 573 | .attach_adapter = saa711x_attach_adapter, |
575 | .detach_client = saa711x_detach_client, | 574 | .detach_client = saa711x_detach_client, |
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index c36f014f1fdf..bca6ed0e2752 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c | |||
@@ -69,7 +69,8 @@ MODULE_PARM_DESC(test_image, "test_image (0-1)"); | |||
69 | #define saa7127_dbg(fmt, arg...) \ | 69 | #define saa7127_dbg(fmt, arg...) \ |
70 | do { \ | 70 | do { \ |
71 | if (debug >= 1) \ | 71 | if (debug >= 1) \ |
72 | printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \ | 72 | printk(KERN_INFO "%s debug %d-%04x: " fmt, \ |
73 | client->driver->driver.name, \ | ||
73 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ | 74 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ |
74 | } while (0) | 75 | } while (0) |
75 | 76 | ||
@@ -77,15 +78,16 @@ MODULE_PARM_DESC(test_image, "test_image (0-1)"); | |||
77 | #define saa7127_dbg_highvol(fmt, arg...) \ | 78 | #define saa7127_dbg_highvol(fmt, arg...) \ |
78 | do { \ | 79 | do { \ |
79 | if (debug == 2) \ | 80 | if (debug == 2) \ |
80 | printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \ | 81 | printk(KERN_INFO "%s debug %d-%04x: " fmt, \ |
82 | client->driver->driver.name, \ | ||
81 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ | 83 | i2c_adapter_id(client->adapter), client->addr , ## arg); \ |
82 | } while (0) | 84 | } while (0) |
83 | 85 | ||
84 | #define saa7127_err(fmt, arg...) do { \ | 86 | #define saa7127_err(fmt, arg...) do { \ |
85 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \ | 87 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \ |
86 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 88 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
87 | #define saa7127_info(fmt, arg...) do { \ | 89 | #define saa7127_info(fmt, arg...) do { \ |
88 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \ | 90 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ |
89 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 91 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
90 | 92 | ||
91 | static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; | 93 | static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; |
@@ -719,7 +721,6 @@ static int saa7127_attach(struct i2c_adapter *adapter, int address, int kind) | |||
719 | client->addr = address; | 721 | client->addr = address; |
720 | client->adapter = adapter; | 722 | client->adapter = adapter; |
721 | client->driver = &i2c_driver_saa7127; | 723 | client->driver = &i2c_driver_saa7127; |
722 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
723 | snprintf(client->name, sizeof(client->name) - 1, "saa7127"); | 724 | snprintf(client->name, sizeof(client->name) - 1, "saa7127"); |
724 | 725 | ||
725 | saa7127_dbg("detecting saa7127 client on address 0x%x\n", address << 1); | 726 | saa7127_dbg("detecting saa7127 client on address 0x%x\n", address << 1); |
@@ -819,13 +820,13 @@ static int saa7127_detach(struct i2c_client *client) | |||
819 | /* ----------------------------------------------------------------------- */ | 820 | /* ----------------------------------------------------------------------- */ |
820 | 821 | ||
821 | static struct i2c_driver i2c_driver_saa7127 = { | 822 | static struct i2c_driver i2c_driver_saa7127 = { |
822 | .name = "saa7127", | 823 | .driver = { |
824 | .name = "saa7127", | ||
825 | }, | ||
823 | .id = I2C_DRIVERID_SAA7127, | 826 | .id = I2C_DRIVERID_SAA7127, |
824 | .flags = I2C_DF_NOTIFY, | ||
825 | .attach_adapter = saa7127_probe, | 827 | .attach_adapter = saa7127_probe, |
826 | .detach_client = saa7127_detach, | 828 | .detach_client = saa7127_detach, |
827 | .command = saa7127_command, | 829 | .command = saa7127_command, |
828 | .owner = THIS_MODULE, | ||
829 | }; | 830 | }; |
830 | 831 | ||
831 | 832 | ||
diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c index a61d24f588f7..4615a982ac64 100644 --- a/drivers/media/video/saa7134/saa6752hs.c +++ b/drivers/media/video/saa7134/saa6752hs.c | |||
@@ -597,10 +597,10 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
597 | /* ----------------------------------------------------------------------- */ | 597 | /* ----------------------------------------------------------------------- */ |
598 | 598 | ||
599 | static struct i2c_driver driver = { | 599 | static struct i2c_driver driver = { |
600 | .owner = THIS_MODULE, | 600 | .driver = { |
601 | .name = "i2c saa6752hs MPEG encoder", | 601 | .name = "i2c saa6752hs MPEG encoder", |
602 | }, | ||
602 | .id = I2C_DRIVERID_SAA6752HS, | 603 | .id = I2C_DRIVERID_SAA6752HS, |
603 | .flags = I2C_DF_NOTIFY, | ||
604 | .attach_adapter = saa6752hs_probe, | 604 | .attach_adapter = saa6752hs_probe, |
605 | .detach_client = saa6752hs_detach, | 605 | .detach_client = saa6752hs_detach, |
606 | .command = saa6752hs_command, | 606 | .command = saa6752hs_command, |
@@ -609,7 +609,6 @@ static struct i2c_driver driver = { | |||
609 | static struct i2c_client client_template = | 609 | static struct i2c_client client_template = |
610 | { | 610 | { |
611 | .name = "saa6752hs", | 611 | .name = "saa6752hs", |
612 | .flags = I2C_CLIENT_ALLOW_USE, | ||
613 | .driver = &driver, | 612 | .driver = &driver, |
614 | }; | 613 | }; |
615 | 614 | ||
diff --git a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c index df9dd36721e0..1792d03d621d 100644 --- a/drivers/media/video/saa7134/saa7134-i2c.c +++ b/drivers/media/video/saa7134/saa7134-i2c.c | |||
@@ -333,7 +333,7 @@ static int attach_inform(struct i2c_client *client) | |||
333 | struct tuner_setup tun_setup; | 333 | struct tuner_setup tun_setup; |
334 | 334 | ||
335 | d1printk( "%s i2c attach [addr=0x%x,client=%s]\n", | 335 | d1printk( "%s i2c attach [addr=0x%x,client=%s]\n", |
336 | client->driver->name, client->addr, client->name); | 336 | client->driver->driver.name, client->addr, client->name); |
337 | 337 | ||
338 | /* Am I an i2c remote control? */ | 338 | /* Am I an i2c remote control? */ |
339 | 339 | ||
@@ -343,7 +343,7 @@ static int attach_inform(struct i2c_client *client) | |||
343 | { | 343 | { |
344 | struct IR_i2c *ir = i2c_get_clientdata(client); | 344 | struct IR_i2c *ir = i2c_get_clientdata(client); |
345 | d1printk("%s i2c IR detected (%s).\n", | 345 | d1printk("%s i2c IR detected (%s).\n", |
346 | client->driver->name,ir->phys); | 346 | client->driver->driver.name, ir->phys); |
347 | saa7134_set_i2c_ir(dev,ir); | 347 | saa7134_set_i2c_ir(dev,ir); |
348 | break; | 348 | break; |
349 | } | 349 | } |
diff --git a/drivers/media/video/saa7185.c b/drivers/media/video/saa7185.c index 132aa7943c16..f72a9f796209 100644 --- a/drivers/media/video/saa7185.c +++ b/drivers/media/video/saa7185.c | |||
@@ -415,7 +415,6 @@ saa7185_detect_client (struct i2c_adapter *adapter, | |||
415 | client->addr = address; | 415 | client->addr = address; |
416 | client->adapter = adapter; | 416 | client->adapter = adapter; |
417 | client->driver = &i2c_driver_saa7185; | 417 | client->driver = &i2c_driver_saa7185; |
418 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
419 | strlcpy(I2C_NAME(client), "saa7185", sizeof(I2C_NAME(client))); | 418 | strlcpy(I2C_NAME(client), "saa7185", sizeof(I2C_NAME(client))); |
420 | 419 | ||
421 | encoder = kmalloc(sizeof(struct saa7185), GFP_KERNEL); | 420 | encoder = kmalloc(sizeof(struct saa7185), GFP_KERNEL); |
@@ -487,11 +486,11 @@ saa7185_detach_client (struct i2c_client *client) | |||
487 | /* ----------------------------------------------------------------------- */ | 486 | /* ----------------------------------------------------------------------- */ |
488 | 487 | ||
489 | static struct i2c_driver i2c_driver_saa7185 = { | 488 | static struct i2c_driver i2c_driver_saa7185 = { |
490 | .owner = THIS_MODULE, | 489 | .driver = { |
491 | .name = "saa7185", /* name */ | 490 | .name = "saa7185", /* name */ |
491 | }, | ||
492 | 492 | ||
493 | .id = I2C_DRIVERID_SAA7185B, | 493 | .id = I2C_DRIVERID_SAA7185B, |
494 | .flags = I2C_DF_NOTIFY, | ||
495 | 494 | ||
496 | .attach_adapter = saa7185_attach_adapter, | 495 | .attach_adapter = saa7185_attach_adapter, |
497 | .detach_client = saa7185_detach_client, | 496 | .detach_client = saa7185_detach_client, |
diff --git a/drivers/media/video/saa7191.c b/drivers/media/video/saa7191.c index cbca896e8cfa..41f6f05a0436 100644 --- a/drivers/media/video/saa7191.c +++ b/drivers/media/video/saa7191.c | |||
@@ -788,10 +788,10 @@ static int saa7191_command(struct i2c_client *client, unsigned int cmd, | |||
788 | } | 788 | } |
789 | 789 | ||
790 | static struct i2c_driver i2c_driver_saa7191 = { | 790 | static struct i2c_driver i2c_driver_saa7191 = { |
791 | .owner = THIS_MODULE, | 791 | .driver = { |
792 | .name = "saa7191", | 792 | .name = "saa7191", |
793 | }, | ||
793 | .id = I2C_DRIVERID_SAA7191, | 794 | .id = I2C_DRIVERID_SAA7191, |
794 | .flags = I2C_DF_NOTIFY, | ||
795 | .attach_adapter = saa7191_probe, | 795 | .attach_adapter = saa7191_probe, |
796 | .detach_client = saa7191_detach, | 796 | .detach_client = saa7191_detach, |
797 | .command = saa7191_command | 797 | .command = saa7191_command |
diff --git a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c index d32737dd2142..549c9929f107 100644 --- a/drivers/media/video/tda7432.c +++ b/drivers/media/video/tda7432.c | |||
@@ -501,10 +501,10 @@ static int tda7432_command(struct i2c_client *client, | |||
501 | } | 501 | } |
502 | 502 | ||
503 | static struct i2c_driver driver = { | 503 | static struct i2c_driver driver = { |
504 | .owner = THIS_MODULE, | 504 | .driver = { |
505 | .name = "i2c tda7432 driver", | 505 | .name = "i2c tda7432 driver", |
506 | }, | ||
506 | .id = I2C_DRIVERID_TDA7432, | 507 | .id = I2C_DRIVERID_TDA7432, |
507 | .flags = I2C_DF_NOTIFY, | ||
508 | .attach_adapter = tda7432_probe, | 508 | .attach_adapter = tda7432_probe, |
509 | .detach_client = tda7432_detach, | 509 | .detach_client = tda7432_detach, |
510 | .command = tda7432_command, | 510 | .command = tda7432_command, |
diff --git a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c index 0cb5c7e9a884..ed4c04119ccc 100644 --- a/drivers/media/video/tda9840.c +++ b/drivers/media/video/tda9840.c | |||
@@ -221,10 +221,10 @@ static int detach(struct i2c_client *client) | |||
221 | } | 221 | } |
222 | 222 | ||
223 | static struct i2c_driver driver = { | 223 | static struct i2c_driver driver = { |
224 | .owner = THIS_MODULE, | 224 | .driver = { |
225 | .name = "tda9840", | 225 | .name = "tda9840", |
226 | }, | ||
226 | .id = I2C_DRIVERID_TDA9840, | 227 | .id = I2C_DRIVERID_TDA9840, |
227 | .flags = I2C_DF_NOTIFY, | ||
228 | .attach_adapter = attach, | 228 | .attach_adapter = attach, |
229 | .detach_client = detach, | 229 | .detach_client = detach, |
230 | .command = command, | 230 | .command = command, |
diff --git a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c index a5e37dc91f39..9c3ecf7a0fed 100644 --- a/drivers/media/video/tda9875.c +++ b/drivers/media/video/tda9875.c | |||
@@ -372,10 +372,10 @@ static int tda9875_command(struct i2c_client *client, | |||
372 | 372 | ||
373 | 373 | ||
374 | static struct i2c_driver driver = { | 374 | static struct i2c_driver driver = { |
375 | .owner = THIS_MODULE, | 375 | .driver = { |
376 | .name = "i2c tda9875 driver", | 376 | .name = "i2c tda9875 driver", |
377 | }, | ||
377 | .id = I2C_DRIVERID_TDA9875, | 378 | .id = I2C_DRIVERID_TDA9875, |
378 | .flags = I2C_DF_NOTIFY, | ||
379 | .attach_adapter = tda9875_probe, | 379 | .attach_adapter = tda9875_probe, |
380 | .detach_client = tda9875_detach, | 380 | .detach_client = tda9875_detach, |
381 | .command = tda9875_command, | 381 | .command = tda9875_command, |
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c index 2f2414e90e8b..7165a1b9625a 100644 --- a/drivers/media/video/tda9887.c +++ b/drivers/media/video/tda9887.c | |||
@@ -819,14 +819,12 @@ static int tda9887_resume(struct device * dev) | |||
819 | /* ----------------------------------------------------------------------- */ | 819 | /* ----------------------------------------------------------------------- */ |
820 | 820 | ||
821 | static struct i2c_driver driver = { | 821 | static struct i2c_driver driver = { |
822 | .owner = THIS_MODULE, | ||
823 | .name = "i2c tda9887 driver", | ||
824 | .id = -1, /* FIXME */ | 822 | .id = -1, /* FIXME */ |
825 | .flags = I2C_DF_NOTIFY, | ||
826 | .attach_adapter = tda9887_probe, | 823 | .attach_adapter = tda9887_probe, |
827 | .detach_client = tda9887_detach, | 824 | .detach_client = tda9887_detach, |
828 | .command = tda9887_command, | 825 | .command = tda9887_command, |
829 | .driver = { | 826 | .driver = { |
827 | .name = "i2c tda9887 driver", | ||
830 | .suspend = tda9887_suspend, | 828 | .suspend = tda9887_suspend, |
831 | .resume = tda9887_resume, | 829 | .resume = tda9887_resume, |
832 | }, | 830 | }, |
@@ -834,7 +832,6 @@ static struct i2c_driver driver = { | |||
834 | static struct i2c_client client_template = | 832 | static struct i2c_client client_template = |
835 | { | 833 | { |
836 | .name = "tda9887", | 834 | .name = "tda9887", |
837 | .flags = I2C_CLIENT_ALLOW_USE, | ||
838 | .driver = &driver, | 835 | .driver = &driver, |
839 | }; | 836 | }; |
840 | 837 | ||
diff --git a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c index 09149dad1b84..bb35844e3842 100644 --- a/drivers/media/video/tea6415c.c +++ b/drivers/media/video/tea6415c.c | |||
@@ -190,10 +190,10 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
190 | } | 190 | } |
191 | 191 | ||
192 | static struct i2c_driver driver = { | 192 | static struct i2c_driver driver = { |
193 | .owner = THIS_MODULE, | 193 | .driver = { |
194 | .name = "tea6415c", | 194 | .name = "tea6415c", |
195 | }, | ||
195 | .id = I2C_DRIVERID_TEA6415C, | 196 | .id = I2C_DRIVERID_TEA6415C, |
196 | .flags = I2C_DF_NOTIFY, | ||
197 | .attach_adapter = attach, | 197 | .attach_adapter = attach, |
198 | .detach_client = detach, | 198 | .detach_client = detach, |
199 | .command = command, | 199 | .command = command, |
diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c index e908f917c8d2..c4ba3742f5c7 100644 --- a/drivers/media/video/tea6420.c +++ b/drivers/media/video/tea6420.c | |||
@@ -167,10 +167,10 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | static struct i2c_driver driver = { | 169 | static struct i2c_driver driver = { |
170 | .owner = THIS_MODULE, | 170 | .driver = { |
171 | .name = "tea6420", | 171 | .name = "tea6420", |
172 | }, | ||
172 | .id = I2C_DRIVERID_TEA6420, | 173 | .id = I2C_DRIVERID_TEA6420, |
173 | .flags = I2C_DF_NOTIFY, | ||
174 | .attach_adapter = attach, | 174 | .attach_adapter = attach, |
175 | .detach_client = detach, | 175 | .detach_client = detach, |
176 | .command = command, | 176 | .command = command, |
diff --git a/drivers/media/video/tuner-3036.c b/drivers/media/video/tuner-3036.c index 79203595b9c1..d97f66804c37 100644 --- a/drivers/media/video/tuner-3036.c +++ b/drivers/media/video/tuner-3036.c | |||
@@ -175,10 +175,10 @@ tuner_probe(struct i2c_adapter *adap) | |||
175 | static struct i2c_driver | 175 | static struct i2c_driver |
176 | i2c_driver_tuner = | 176 | i2c_driver_tuner = |
177 | { | 177 | { |
178 | .owner = THIS_MODULE, | 178 | .driver = { |
179 | .name = "sab3036", | 179 | .name = "sab3036", |
180 | }, | ||
180 | .id = I2C_DRIVERID_SAB3036, | 181 | .id = I2C_DRIVERID_SAB3036, |
181 | .flags = I2C_DF_NOTIFY, | ||
182 | .attach_adapter = tuner_probe, | 182 | .attach_adapter = tuner_probe, |
183 | .detach_client = tuner_detach, | 183 | .detach_client = tuner_detach, |
184 | .command = tuner_command | 184 | .command = tuner_command |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index e58abdfcaab8..c13c7b95ef35 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -206,7 +206,7 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
206 | 206 | ||
207 | set_freq(c, t->freq); | 207 | set_freq(c, t->freq); |
208 | tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n", | 208 | tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n", |
209 | c->adapter->name, c->driver->name, c->addr << 1, type, | 209 | c->adapter->name, c->driver->driver.name, c->addr << 1, type, |
210 | t->mode_mask); | 210 | t->mode_mask); |
211 | } | 211 | } |
212 | 212 | ||
@@ -742,21 +742,18 @@ static int tuner_resume(struct device *dev) | |||
742 | /* ----------------------------------------------------------------------- */ | 742 | /* ----------------------------------------------------------------------- */ |
743 | 743 | ||
744 | static struct i2c_driver driver = { | 744 | static struct i2c_driver driver = { |
745 | .owner = THIS_MODULE, | ||
746 | .name = "tuner", | ||
747 | .id = I2C_DRIVERID_TUNER, | 745 | .id = I2C_DRIVERID_TUNER, |
748 | .flags = I2C_DF_NOTIFY, | ||
749 | .attach_adapter = tuner_probe, | 746 | .attach_adapter = tuner_probe, |
750 | .detach_client = tuner_detach, | 747 | .detach_client = tuner_detach, |
751 | .command = tuner_command, | 748 | .command = tuner_command, |
752 | .driver = { | 749 | .driver = { |
750 | .name = "tuner", | ||
753 | .suspend = tuner_suspend, | 751 | .suspend = tuner_suspend, |
754 | .resume = tuner_resume, | 752 | .resume = tuner_resume, |
755 | }, | 753 | }, |
756 | }; | 754 | }; |
757 | static struct i2c_client client_template = { | 755 | static struct i2c_client client_template = { |
758 | .name = "(tuner unset)", | 756 | .name = "(tuner unset)", |
759 | .flags = I2C_CLIENT_ALLOW_USE, | ||
760 | .driver = &driver, | 757 | .driver = &driver, |
761 | }; | 758 | }; |
762 | 759 | ||
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index 5b20e8177cad..0292c5abf14a 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -1702,10 +1702,10 @@ static int chip_command(struct i2c_client *client, | |||
1702 | 1702 | ||
1703 | 1703 | ||
1704 | static struct i2c_driver driver = { | 1704 | static struct i2c_driver driver = { |
1705 | .owner = THIS_MODULE, | 1705 | .driver = { |
1706 | .name = "generic i2c audio driver", | 1706 | .name = "generic i2c audio driver", |
1707 | }, | ||
1707 | .id = I2C_DRIVERID_TVAUDIO, | 1708 | .id = I2C_DRIVERID_TVAUDIO, |
1708 | .flags = I2C_DF_NOTIFY, | ||
1709 | .attach_adapter = chip_probe, | 1709 | .attach_adapter = chip_probe, |
1710 | .detach_client = chip_detach, | 1710 | .detach_client = chip_detach, |
1711 | .command = chip_command, | 1711 | .command = chip_command, |
@@ -1714,7 +1714,6 @@ static struct i2c_driver driver = { | |||
1714 | static struct i2c_client client_template = | 1714 | static struct i2c_client client_template = |
1715 | { | 1715 | { |
1716 | .name = "(unset)", | 1716 | .name = "(unset)", |
1717 | .flags = I2C_CLIENT_ALLOW_USE, | ||
1718 | .driver = &driver, | 1717 | .driver = &driver, |
1719 | }; | 1718 | }; |
1720 | 1719 | ||
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index 5ac235365dd8..8ac4cb82a459 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -751,7 +751,6 @@ tveeprom_detect_client(struct i2c_adapter *adapter, | |||
751 | client->addr = address; | 751 | client->addr = address; |
752 | client->adapter = adapter; | 752 | client->adapter = adapter; |
753 | client->driver = &i2c_driver_tveeprom; | 753 | client->driver = &i2c_driver_tveeprom; |
754 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
755 | snprintf(client->name, sizeof(client->name), "tveeprom"); | 754 | snprintf(client->name, sizeof(client->name), "tveeprom"); |
756 | i2c_attach_client(client); | 755 | i2c_attach_client(client); |
757 | 756 | ||
@@ -779,10 +778,10 @@ tveeprom_detach_client (struct i2c_client *client) | |||
779 | } | 778 | } |
780 | 779 | ||
781 | static struct i2c_driver i2c_driver_tveeprom = { | 780 | static struct i2c_driver i2c_driver_tveeprom = { |
782 | .owner = THIS_MODULE, | 781 | .driver = { |
783 | .name = "tveeprom", | 782 | .name = "tveeprom", |
783 | }, | ||
784 | .id = I2C_DRIVERID_TVEEPROM, | 784 | .id = I2C_DRIVERID_TVEEPROM, |
785 | .flags = I2C_DF_NOTIFY, | ||
786 | .attach_adapter = tveeprom_attach_adapter, | 785 | .attach_adapter = tveeprom_attach_adapter, |
787 | .detach_client = tveeprom_detach_client, | 786 | .detach_client = tveeprom_detach_client, |
788 | .command = tveeprom_command, | 787 | .command = tveeprom_command, |
diff --git a/drivers/media/video/tvmixer.c b/drivers/media/video/tvmixer.c index 8318bd1aad00..e837f9f7fed6 100644 --- a/drivers/media/video/tvmixer.c +++ b/drivers/media/video/tvmixer.c | |||
@@ -228,16 +228,14 @@ static int tvmixer_release(struct inode *inode, struct file *file) | |||
228 | 228 | ||
229 | static struct i2c_driver driver = { | 229 | static struct i2c_driver driver = { |
230 | #ifdef I2C_PEC | 230 | #ifdef I2C_PEC |
231 | .owner = THIS_MODULE, | 231 | .driver = { |
232 | #endif | 232 | .name = "tv card mixer driver", |
233 | }, | ||
234 | #else | ||
233 | .name = "tv card mixer driver", | 235 | .name = "tv card mixer driver", |
236 | #endif | ||
234 | .id = I2C_DRIVERID_TVMIXER, | 237 | .id = I2C_DRIVERID_TVMIXER, |
235 | #ifdef I2C_DF_DUMMY | ||
236 | .flags = I2C_DF_DUMMY, | ||
237 | #else | ||
238 | .flags = I2C_DF_NOTIFY, | ||
239 | .detach_adapter = tvmixer_adapters, | 238 | .detach_adapter = tvmixer_adapters, |
240 | #endif | ||
241 | .attach_adapter = tvmixer_adapters, | 239 | .attach_adapter = tvmixer_adapters, |
242 | .detach_client = tvmixer_clients, | 240 | .detach_client = tvmixer_clients, |
243 | }; | 241 | }; |
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 97431e26d229..a60442ea4f94 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -714,7 +714,6 @@ static struct i2c_driver driver; | |||
714 | 714 | ||
715 | static struct i2c_client client_template = { | 715 | static struct i2c_client client_template = { |
716 | .name = "(unset)", | 716 | .name = "(unset)", |
717 | .flags = I2C_CLIENT_ALLOW_USE, | ||
718 | .driver = &driver, | 717 | .driver = &driver, |
719 | }; | 718 | }; |
720 | 719 | ||
@@ -801,12 +800,12 @@ static int tvp5150_detach_client(struct i2c_client *client) | |||
801 | /* ----------------------------------------------------------------------- */ | 800 | /* ----------------------------------------------------------------------- */ |
802 | 801 | ||
803 | static struct i2c_driver driver = { | 802 | static struct i2c_driver driver = { |
804 | .owner = THIS_MODULE, | 803 | .driver = { |
805 | .name = "tvp5150", | 804 | .name = "tvp5150", |
805 | }, | ||
806 | 806 | ||
807 | /* FIXME */ | 807 | /* FIXME */ |
808 | .id = I2C_DRIVERID_SAA7110, | 808 | .id = I2C_DRIVERID_SAA7110, |
809 | .flags = I2C_DF_NOTIFY, | ||
810 | 809 | ||
811 | .attach_adapter = tvp5150_attach_adapter, | 810 | .attach_adapter = tvp5150_attach_adapter, |
812 | .detach_client = tvp5150_detach_client, | 811 | .detach_client = tvp5150_detach_client, |
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index 137b58f2c666..8dcee8b60e21 100644 --- a/drivers/media/video/vpx3220.c +++ b/drivers/media/video/vpx3220.c | |||
@@ -631,7 +631,6 @@ vpx3220_detect_client (struct i2c_adapter *adapter, | |||
631 | client->addr = address; | 631 | client->addr = address; |
632 | client->adapter = adapter; | 632 | client->adapter = adapter; |
633 | client->driver = &vpx3220_i2c_driver; | 633 | client->driver = &vpx3220_i2c_driver; |
634 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
635 | 634 | ||
636 | /* Check for manufacture ID and part number */ | 635 | /* Check for manufacture ID and part number */ |
637 | if (kind < 0) { | 636 | if (kind < 0) { |
@@ -722,11 +721,11 @@ vpx3220_attach_adapter (struct i2c_adapter *adapter) | |||
722 | */ | 721 | */ |
723 | 722 | ||
724 | static struct i2c_driver vpx3220_i2c_driver = { | 723 | static struct i2c_driver vpx3220_i2c_driver = { |
725 | .owner = THIS_MODULE, | 724 | .driver = { |
726 | .name = "vpx3220", | 725 | .name = "vpx3220", |
726 | }, | ||
727 | 727 | ||
728 | .id = I2C_DRIVERID_VPX3220, | 728 | .id = I2C_DRIVERID_VPX3220, |
729 | .flags = I2C_DF_NOTIFY, | ||
730 | 729 | ||
731 | .attach_adapter = vpx3220_attach_adapter, | 730 | .attach_adapter = vpx3220_attach_adapter, |
732 | .detach_client = vpx3220_detach_client, | 731 | .detach_client = vpx3220_detach_client, |
diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c index a6936ad74fcf..bbfd55cd9948 100644 --- a/drivers/media/video/wm8775.c +++ b/drivers/media/video/wm8775.c | |||
@@ -40,10 +40,10 @@ MODULE_AUTHOR("Ulf Eklund, Hans Verkuil"); | |||
40 | MODULE_LICENSE("GPL"); | 40 | MODULE_LICENSE("GPL"); |
41 | 41 | ||
42 | #define wm8775_err(fmt, arg...) do { \ | 42 | #define wm8775_err(fmt, arg...) do { \ |
43 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \ | 43 | printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \ |
44 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 44 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
45 | #define wm8775_info(fmt, arg...) do { \ | 45 | #define wm8775_info(fmt, arg...) do { \ |
46 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \ | 46 | printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \ |
47 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) | 47 | i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0) |
48 | 48 | ||
49 | 49 | ||
@@ -168,7 +168,6 @@ static int wm8775_attach(struct i2c_adapter *adapter, int address, int kind) | |||
168 | client->addr = address; | 168 | client->addr = address; |
169 | client->adapter = adapter; | 169 | client->adapter = adapter; |
170 | client->driver = &i2c_driver; | 170 | client->driver = &i2c_driver; |
171 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
172 | snprintf(client->name, sizeof(client->name) - 1, "wm8775"); | 171 | snprintf(client->name, sizeof(client->name) - 1, "wm8775"); |
173 | 172 | ||
174 | wm8775_info("chip found @ 0x%x (%s)\n", address << 1, adapter->name); | 173 | wm8775_info("chip found @ 0x%x (%s)\n", address << 1, adapter->name); |
@@ -233,15 +232,15 @@ static int wm8775_detach(struct i2c_client *client) | |||
233 | 232 | ||
234 | /* i2c implementation */ | 233 | /* i2c implementation */ |
235 | static struct i2c_driver i2c_driver = { | 234 | static struct i2c_driver i2c_driver = { |
236 | .name = "wm8775", | 235 | .driver = { |
236 | .name = "wm8775", | ||
237 | }, | ||
237 | 238 | ||
238 | .id = I2C_DRIVERID_WM8775, | 239 | .id = I2C_DRIVERID_WM8775, |
239 | .flags = I2C_DF_NOTIFY, | ||
240 | 240 | ||
241 | .attach_adapter = wm8775_probe, | 241 | .attach_adapter = wm8775_probe, |
242 | .detach_client = wm8775_detach, | 242 | .detach_client = wm8775_detach, |
243 | .command = wm8775_command, | 243 | .command = wm8775_command, |
244 | .owner = THIS_MODULE, | ||
245 | }; | 244 | }; |
246 | 245 | ||
247 | 246 | ||
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 07bde9acd672..4034f1b45366 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -1311,7 +1311,7 @@ zoran_open (struct inode *inode, | |||
1311 | res = -ENODEV; | 1311 | res = -ENODEV; |
1312 | goto open_unlock_and_return; | 1312 | goto open_unlock_and_return; |
1313 | } | 1313 | } |
1314 | if (!try_module_get(zr->decoder->driver->owner)) { | 1314 | if (!try_module_get(zr->decoder->driver->driver.owner)) { |
1315 | dprintk(1, | 1315 | dprintk(1, |
1316 | KERN_ERR | 1316 | KERN_ERR |
1317 | "%s: failed to grab ownership of i2c decoder\n", | 1317 | "%s: failed to grab ownership of i2c decoder\n", |
@@ -1321,13 +1321,13 @@ zoran_open (struct inode *inode, | |||
1321 | goto open_unlock_and_return; | 1321 | goto open_unlock_and_return; |
1322 | } | 1322 | } |
1323 | if (zr->encoder && | 1323 | if (zr->encoder && |
1324 | !try_module_get(zr->encoder->driver->owner)) { | 1324 | !try_module_get(zr->encoder->driver->driver.owner)) { |
1325 | dprintk(1, | 1325 | dprintk(1, |
1326 | KERN_ERR | 1326 | KERN_ERR |
1327 | "%s: failed to grab ownership of i2c encoder\n", | 1327 | "%s: failed to grab ownership of i2c encoder\n", |
1328 | ZR_DEVNAME(zr)); | 1328 | ZR_DEVNAME(zr)); |
1329 | res = -EIO; | 1329 | res = -EIO; |
1330 | module_put(zr->decoder->driver->owner); | 1330 | module_put(zr->decoder->driver->driver.owner); |
1331 | module_put(THIS_MODULE); | 1331 | module_put(THIS_MODULE); |
1332 | goto open_unlock_and_return; | 1332 | goto open_unlock_and_return; |
1333 | } | 1333 | } |
@@ -1393,9 +1393,9 @@ zoran_open (struct inode *inode, | |||
1393 | open_unlock_and_return: | 1393 | open_unlock_and_return: |
1394 | /* if we grabbed locks, release them accordingly */ | 1394 | /* if we grabbed locks, release them accordingly */ |
1395 | if (have_module_locks) { | 1395 | if (have_module_locks) { |
1396 | module_put(zr->decoder->driver->owner); | 1396 | module_put(zr->decoder->driver->driver.owner); |
1397 | if (zr->encoder) { | 1397 | if (zr->encoder) { |
1398 | module_put(zr->encoder->driver->owner); | 1398 | module_put(zr->encoder->driver->driver.owner); |
1399 | } | 1399 | } |
1400 | module_put(THIS_MODULE); | 1400 | module_put(THIS_MODULE); |
1401 | } | 1401 | } |
@@ -1461,9 +1461,9 @@ zoran_close (struct inode *inode, | |||
1461 | kfree(fh); | 1461 | kfree(fh); |
1462 | 1462 | ||
1463 | /* release locks on the i2c modules */ | 1463 | /* release locks on the i2c modules */ |
1464 | module_put(zr->decoder->driver->owner); | 1464 | module_put(zr->decoder->driver->driver.owner); |
1465 | if (zr->encoder) { | 1465 | if (zr->encoder) { |
1466 | module_put(zr->encoder->driver->owner); | 1466 | module_put(zr->encoder->driver->driver.owner); |
1467 | } | 1467 | } |
1468 | module_put(THIS_MODULE); | 1468 | module_put(THIS_MODULE); |
1469 | 1469 | ||