diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-11-26 15:00:54 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-06 01:16:22 -0500 |
commit | cde7859bda0d1124392b44e50aa11df99707e1d9 (patch) | |
tree | c852e7ff9b44b5e59f6ae75951514585f0ff10d9 /drivers | |
parent | cb748fb20186d4b345c68a7f580429f379fdd268 (diff) |
[PATCH] i2c: Rework client usage count, 2 of 3
Make I2C_CLIENT_ALLOW_USE the default for all i2c clients. It doesn't
hurt if the usage count is actually never used for any given driver,
and allows for nice code simplifications in i2c-core.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
27 files changed, 10 insertions, 44 deletions
diff --git a/drivers/i2c/chips/rtc8564.c b/drivers/i2c/chips/rtc8564.c index e586f75dd024..07494d394381 100644 --- a/drivers/i2c/chips/rtc8564.c +++ b/drivers/i2c/chips/rtc8564.c | |||
@@ -155,7 +155,6 @@ static int rtc8564_attach(struct i2c_adapter *adap, int addr, int kind) | |||
155 | 155 | ||
156 | strlcpy(new_client->name, "RTC8564", I2C_NAME_SIZE); | 156 | strlcpy(new_client->name, "RTC8564", I2C_NAME_SIZE); |
157 | i2c_set_clientdata(new_client, d); | 157 | i2c_set_clientdata(new_client, d); |
158 | new_client->flags = I2C_CLIENT_ALLOW_USE; | ||
159 | new_client->addr = addr; | 158 | new_client->addr = addr; |
160 | new_client->adapter = adap; | 159 | new_client->adapter = adap; |
161 | new_client->driver = &rtc8564_driver; | 160 | new_client->driver = &rtc8564_driver; |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 2f0bc9529376..d16b4998c4c2 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -419,8 +419,7 @@ int i2c_attach_client(struct i2c_client *client) | |||
419 | } | 419 | } |
420 | } | 420 | } |
421 | 421 | ||
422 | if (client->flags & I2C_CLIENT_ALLOW_USE) | 422 | client->usage_count = 0; |
423 | client->usage_count = 0; | ||
424 | 423 | ||
425 | client->dev.parent = &client->adapter->dev; | 424 | client->dev.parent = &client->adapter->dev; |
426 | client->dev.driver = &client->driver->driver; | 425 | client->dev.driver = &client->driver->driver; |
@@ -443,8 +442,7 @@ int i2c_detach_client(struct i2c_client *client) | |||
443 | struct i2c_adapter *adapter = client->adapter; | 442 | struct i2c_adapter *adapter = client->adapter; |
444 | int res = 0; | 443 | int res = 0; |
445 | 444 | ||
446 | if ((client->flags & I2C_CLIENT_ALLOW_USE) | 445 | if (client->usage_count > 0) { |
447 | && (client->usage_count > 0)) { | ||
448 | dev_warn(&client->dev, "Client [%s] still busy, " | 446 | dev_warn(&client->dev, "Client [%s] still busy, " |
449 | "can't detach\n", client->name); | 447 | "can't detach\n", client->name); |
450 | return -EBUSY; | 448 | return -EBUSY; |
@@ -499,12 +497,9 @@ int i2c_use_client(struct i2c_client *client) | |||
499 | if (ret) | 497 | if (ret) |
500 | return ret; | 498 | return ret; |
501 | 499 | ||
502 | if (client->flags & I2C_CLIENT_ALLOW_USE) { | 500 | if (client->usage_count > 0) |
503 | if (client->usage_count > 0) | 501 | goto busy; |
504 | goto busy; | 502 | client->usage_count++; |
505 | else | ||
506 | client->usage_count++; | ||
507 | } | ||
508 | 503 | ||
509 | return 0; | 504 | return 0; |
510 | busy: | 505 | busy: |
@@ -514,16 +509,13 @@ int i2c_use_client(struct i2c_client *client) | |||
514 | 509 | ||
515 | int i2c_release_client(struct i2c_client *client) | 510 | int i2c_release_client(struct i2c_client *client) |
516 | { | 511 | { |
517 | if(client->flags & I2C_CLIENT_ALLOW_USE) { | 512 | if (!client->usage_count) { |
518 | if(client->usage_count>0) | 513 | pr_debug("i2c-core: %s used one too many times\n", |
519 | client->usage_count--; | 514 | __FUNCTION__); |
520 | else { | 515 | return -EPERM; |
521 | pr_debug("i2c-core: %s used one too many times\n", | ||
522 | __FUNCTION__); | ||
523 | return -EPERM; | ||
524 | } | ||
525 | } | 516 | } |
526 | 517 | ||
518 | client->usage_count--; | ||
527 | i2c_dec_use_client(client); | 519 | i2c_dec_use_client(client); |
528 | 520 | ||
529 | return 0; | 521 | return 0; |
diff --git a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c index c4f2265167a2..622b1619a7e3 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; |
diff --git a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c index 4fc08b17d4d0..d4859b445715 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; |
diff --git a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c index 7bba69793b78..741e59af0991 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) { |
diff --git a/drivers/media/video/bt832.c b/drivers/media/video/bt832.c index 0ba8652357e2..4ed13860b523 100644 --- a/drivers/media/video/bt832.c +++ b/drivers/media/video/bt832.c | |||
@@ -240,7 +240,6 @@ static struct i2c_driver driver = { | |||
240 | static struct i2c_client client_template = | 240 | static struct i2c_client client_template = |
241 | { | 241 | { |
242 | .name = "bt832", | 242 | .name = "bt832", |
243 | .flags = I2C_CLIENT_ALLOW_USE, | ||
244 | .driver = &driver, | 243 | .driver = &driver, |
245 | }; | 244 | }; |
246 | 245 | ||
diff --git a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c index 4c9acd1e2c70..d4bba8efac69 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); |
diff --git a/drivers/media/video/cs53l32a.c b/drivers/media/video/cs53l32a.c index fce5d89b7b15..f442ce3ba74b 100644 --- a/drivers/media/video/cs53l32a.c +++ b/drivers/media/video/cs53l32a.c | |||
@@ -154,7 +154,6 @@ static int cs53l32a_attach(struct i2c_adapter *adapter, int address, int kind) | |||
154 | client->addr = address; | 154 | client->addr = address; |
155 | client->adapter = adapter; | 155 | client->adapter = adapter; |
156 | client->driver = &i2c_driver; | 156 | client->driver = &i2c_driver; |
157 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
158 | snprintf(client->name, sizeof(client->name) - 1, "cs53l32a"); | 157 | snprintf(client->name, sizeof(client->name) - 1, "cs53l32a"); |
159 | 158 | ||
160 | cs53l32a_info("chip found @ 0x%x (%s)\n", address << 1, adapter->name); | 159 | cs53l32a_info("chip found @ 0x%x (%s)\n", address << 1, adapter->name); |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index c66bc147ee71..0b278abe879d 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); |
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/msp3400.c b/drivers/media/video/msp3400.c index 46328fb6fe80..c5e8ad3aac4a 100644 --- a/drivers/media/video/msp3400.c +++ b/drivers/media/video/msp3400.c | |||
@@ -1576,7 +1576,6 @@ static struct i2c_driver driver = { | |||
1576 | static struct i2c_client client_template = | 1576 | static struct i2c_client client_template = |
1577 | { | 1577 | { |
1578 | .name = "(unset)", | 1578 | .name = "(unset)", |
1579 | .flags = I2C_CLIENT_ALLOW_USE, | ||
1580 | .driver = &driver, | 1579 | .driver = &driver, |
1581 | }; | 1580 | }; |
1582 | 1581 | ||
diff --git a/drivers/media/video/saa6588.c b/drivers/media/video/saa6588.c index 18a0b7143e8b..3d4076ca67c3 100644 --- a/drivers/media/video/saa6588.c +++ b/drivers/media/video/saa6588.c | |||
@@ -505,7 +505,6 @@ static struct i2c_driver driver = { | |||
505 | 505 | ||
506 | static struct i2c_client client_template = { | 506 | static struct i2c_client client_template = { |
507 | .name = "saa6588", | 507 | .name = "saa6588", |
508 | .flags = I2C_CLIENT_ALLOW_USE, | ||
509 | .driver = &driver, | 508 | .driver = &driver, |
510 | }; | 509 | }; |
511 | 510 | ||
diff --git a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c index f266b35ceb35..8affa63c8b24 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); |
diff --git a/drivers/media/video/saa7111.c b/drivers/media/video/saa7111.c index 687beaf11adc..2b2204564514 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); |
diff --git a/drivers/media/video/saa7114.c b/drivers/media/video/saa7114.c index 4748cf0598c0..285f6c7a8f71 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); |
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index b1079de938b7..79aadd2d408f 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -1270,7 +1270,6 @@ static int saa7115_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1270 | client->addr = address; | 1270 | client->addr = address; |
1271 | client->adapter = adapter; | 1271 | client->adapter = adapter; |
1272 | client->driver = &i2c_driver_saa7115; | 1272 | client->driver = &i2c_driver_saa7115; |
1273 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
1274 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); | 1273 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); |
1275 | 1274 | ||
1276 | saa7115_dbg("detecting saa7115 client on address 0x%x\n", address << 1); | 1275 | saa7115_dbg("detecting saa7115 client on address 0x%x\n", address << 1); |
diff --git a/drivers/media/video/saa711x.c b/drivers/media/video/saa711x.c index 734a70919080..44bfc047704c 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) { |
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index a2fab9837507..1f4b41599445 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c | |||
@@ -719,7 +719,6 @@ static int saa7127_attach(struct i2c_adapter *adapter, int address, int kind) | |||
719 | client->addr = address; | 719 | client->addr = address; |
720 | client->adapter = adapter; | 720 | client->adapter = adapter; |
721 | client->driver = &i2c_driver_saa7127; | 721 | client->driver = &i2c_driver_saa7127; |
722 | client->flags = I2C_CLIENT_ALLOW_USE; | ||
723 | snprintf(client->name, sizeof(client->name) - 1, "saa7127"); | 722 | snprintf(client->name, sizeof(client->name) - 1, "saa7127"); |
724 | 723 | ||
725 | saa7127_dbg("detecting saa7127 client on address 0x%x\n", address << 1); | 724 | saa7127_dbg("detecting saa7127 client on address 0x%x\n", address << 1); |
diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c index 6fc298e0a03a..68206060c92d 100644 --- a/drivers/media/video/saa7134/saa6752hs.c +++ b/drivers/media/video/saa7134/saa6752hs.c | |||
@@ -608,7 +608,6 @@ static struct i2c_driver driver = { | |||
608 | static struct i2c_client client_template = | 608 | static struct i2c_client client_template = |
609 | { | 609 | { |
610 | .name = "saa6752hs", | 610 | .name = "saa6752hs", |
611 | .flags = I2C_CLIENT_ALLOW_USE, | ||
612 | .driver = &driver, | 611 | .driver = &driver, |
613 | }; | 612 | }; |
614 | 613 | ||
diff --git a/drivers/media/video/saa7185.c b/drivers/media/video/saa7185.c index e24aa16f2d8c..9f37585d3f73 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); |
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c index 049b44e0767b..324f61bf714e 100644 --- a/drivers/media/video/tda9887.c +++ b/drivers/media/video/tda9887.c | |||
@@ -833,7 +833,6 @@ static struct i2c_driver driver = { | |||
833 | static struct i2c_client client_template = | 833 | static struct i2c_client client_template = |
834 | { | 834 | { |
835 | .name = "tda9887", | 835 | .name = "tda9887", |
836 | .flags = I2C_CLIENT_ALLOW_USE, | ||
837 | .driver = &driver, | 836 | .driver = &driver, |
838 | }; | 837 | }; |
839 | 838 | ||
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 3c75121f6383..6328f0954e70 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -755,7 +755,6 @@ static struct i2c_driver driver = { | |||
755 | }; | 755 | }; |
756 | static struct i2c_client client_template = { | 756 | static struct i2c_client client_template = { |
757 | .name = "(tuner unset)", | 757 | .name = "(tuner unset)", |
758 | .flags = I2C_CLIENT_ALLOW_USE, | ||
759 | .driver = &driver, | 758 | .driver = &driver, |
760 | }; | 759 | }; |
761 | 760 | ||
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index 3565f35be7a1..4f1f339283e0 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -1713,7 +1713,6 @@ static struct i2c_driver driver = { | |||
1713 | static struct i2c_client client_template = | 1713 | static struct i2c_client client_template = |
1714 | { | 1714 | { |
1715 | .name = "(unset)", | 1715 | .name = "(unset)", |
1716 | .flags = I2C_CLIENT_ALLOW_USE, | ||
1717 | .driver = &driver, | 1716 | .driver = &driver, |
1718 | }; | 1717 | }; |
1719 | 1718 | ||
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index 195bc51d4576..d833b651073a 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 | ||
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 4f3ee2091611..3734554fc73b 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 | ||
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index c66d28505bcd..54bc888c3891 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) { |
diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c index 7b07717a3c67..527c2591749a 100644 --- a/drivers/media/video/wm8775.c +++ b/drivers/media/video/wm8775.c | |||
@@ -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); |