summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-06-19 16:58:17 +0200
committerJean Delvare <khali@linux-fr.org>2009-06-19 16:58:17 +0200
commit352da9820e5506e3b8496e6052a2ad9c488efae8 (patch)
tree61be08b52612e52aa8ecc3bfc3a6adb1e36f3f57 /drivers/i2c
parent0732f87761dbe417cb6e084b712d07e879e876ef (diff)
i2c: Kill client_register and client_unregister methods
These methods were useful in the legacy binding model but no longer in the new (standard) binding model. There are no users left so we can drop them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c-core.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 5ed622ee65c..fc18fdbffd3 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)
return;
}
- if (adapter->client_unregister) {
- if (adapter->client_unregister(client)) {
- dev_warn(&client->dev,
- "client_unregister [%s] failed\n",
- client->name);
- }
- }
-
mutex_lock(&adapter->clist_lock);
list_del(&client->list);
mutex_unlock(&adapter->clist_lock);
@@ -855,14 +847,6 @@ int i2c_attach_client(struct i2c_client *client)
dev_dbg(&adapter->dev, "client [%s] registered with bus id %s\n",
client->name, dev_name(&client->dev));
- if (adapter->client_register) {
- if (adapter->client_register(client)) {
- dev_dbg(&adapter->dev, "client_register "
- "failed for client [%s] at 0x%02x\n",
- client->name, client->addr);
- }
- }
-
return 0;
out_err:
@@ -875,17 +859,6 @@ EXPORT_SYMBOL(i2c_attach_client);
int i2c_detach_client(struct i2c_client *client)
{
struct i2c_adapter *adapter = client->adapter;
- int res = 0;
-
- if (adapter->client_unregister) {
- res = adapter->client_unregister(client);
- if (res) {
- dev_err(&client->dev,
- "client_unregister [%s] failed, "
- "client not detached\n", client->name);
- goto out;
- }
- }
mutex_lock(&adapter->clist_lock);
list_del(&client->list);
@@ -895,8 +868,7 @@ int i2c_detach_client(struct i2c_client *client)
device_unregister(&client->dev);
wait_for_completion(&client->released);
- out:
- return res;
+ return 0;
}
EXPORT_SYMBOL(i2c_detach_client);