diff options
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 3 | ||||
-rw-r--r-- | drivers/i2c/i2c-core.c | 30 | ||||
-rw-r--r-- | include/linux/i2c.h | 4 |
3 files changed, 2 insertions, 35 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 8d07ed31207e..9163dade0706 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -368,8 +368,7 @@ Who: Krzysztof Piotr Oledzki <ole@ans.pl> | |||
368 | 368 | ||
369 | --------------------------- | 369 | --------------------------- |
370 | 370 | ||
371 | What: i2c_attach_client(), i2c_detach_client(), i2c_driver->detach_client(), | 371 | What: i2c_attach_client(), i2c_detach_client(), i2c_driver->detach_client() |
372 | i2c_adapter->client_register(), i2c_adapter->client_unregister | ||
373 | When: 2.6.30 | 372 | When: 2.6.30 |
374 | Check: i2c_attach_client i2c_detach_client | 373 | Check: i2c_attach_client i2c_detach_client |
375 | Why: Deprecated by the new (standard) device driver binding model. Use | 374 | Why: Deprecated by the new (standard) device driver binding model. Use |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 5ed622ee65c3..fc18fdbffd3f 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -308,14 +308,6 @@ void i2c_unregister_device(struct i2c_client *client) | |||
308 | return; | 308 | return; |
309 | } | 309 | } |
310 | 310 | ||
311 | if (adapter->client_unregister) { | ||
312 | if (adapter->client_unregister(client)) { | ||
313 | dev_warn(&client->dev, | ||
314 | "client_unregister [%s] failed\n", | ||
315 | client->name); | ||
316 | } | ||
317 | } | ||
318 | |||
319 | mutex_lock(&adapter->clist_lock); | 311 | mutex_lock(&adapter->clist_lock); |
320 | list_del(&client->list); | 312 | list_del(&client->list); |
321 | mutex_unlock(&adapter->clist_lock); | 313 | mutex_unlock(&adapter->clist_lock); |
@@ -855,14 +847,6 @@ int i2c_attach_client(struct i2c_client *client) | |||
855 | dev_dbg(&adapter->dev, "client [%s] registered with bus id %s\n", | 847 | dev_dbg(&adapter->dev, "client [%s] registered with bus id %s\n", |
856 | client->name, dev_name(&client->dev)); | 848 | client->name, dev_name(&client->dev)); |
857 | 849 | ||
858 | if (adapter->client_register) { | ||
859 | if (adapter->client_register(client)) { | ||
860 | dev_dbg(&adapter->dev, "client_register " | ||
861 | "failed for client [%s] at 0x%02x\n", | ||
862 | client->name, client->addr); | ||
863 | } | ||
864 | } | ||
865 | |||
866 | return 0; | 850 | return 0; |
867 | 851 | ||
868 | out_err: | 852 | out_err: |
@@ -875,17 +859,6 @@ EXPORT_SYMBOL(i2c_attach_client); | |||
875 | int i2c_detach_client(struct i2c_client *client) | 859 | int i2c_detach_client(struct i2c_client *client) |
876 | { | 860 | { |
877 | struct i2c_adapter *adapter = client->adapter; | 861 | struct i2c_adapter *adapter = client->adapter; |
878 | int res = 0; | ||
879 | |||
880 | if (adapter->client_unregister) { | ||
881 | res = adapter->client_unregister(client); | ||
882 | if (res) { | ||
883 | dev_err(&client->dev, | ||
884 | "client_unregister [%s] failed, " | ||
885 | "client not detached\n", client->name); | ||
886 | goto out; | ||
887 | } | ||
888 | } | ||
889 | 862 | ||
890 | mutex_lock(&adapter->clist_lock); | 863 | mutex_lock(&adapter->clist_lock); |
891 | list_del(&client->list); | 864 | list_del(&client->list); |
@@ -895,8 +868,7 @@ int i2c_detach_client(struct i2c_client *client) | |||
895 | device_unregister(&client->dev); | 868 | device_unregister(&client->dev); |
896 | wait_for_completion(&client->released); | 869 | wait_for_completion(&client->released); |
897 | 870 | ||
898 | out: | 871 | return 0; |
899 | return res; | ||
900 | } | 872 | } |
901 | EXPORT_SYMBOL(i2c_detach_client); | 873 | EXPORT_SYMBOL(i2c_detach_client); |
902 | 874 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index ad2580596033..b3f4606afa0e 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -352,10 +352,6 @@ struct i2c_adapter { | |||
352 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ | 352 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ |
353 | void *algo_data; | 353 | void *algo_data; |
354 | 354 | ||
355 | /* --- administration stuff. */ | ||
356 | int (*client_register)(struct i2c_client *) __deprecated; | ||
357 | int (*client_unregister)(struct i2c_client *) __deprecated; | ||
358 | |||
359 | /* data fields that are valid for all devices */ | 355 | /* data fields that are valid for all devices */ |
360 | u8 level; /* nesting level for lockdep */ | 356 | u8 level; /* nesting level for lockdep */ |
361 | struct mutex bus_lock; | 357 | struct mutex bus_lock; |