i2c: make i2c_get_adapter prototype clearer
authorJean Delvare <khali@linux-fr.org>
Sun, 20 Mar 2011 13:50:52 +0000 (14:50 +0100)
committerJean Delvare <khali@endymion.delvare>
Sun, 20 Mar 2011 13:50:52 +0000 (14:50 +0100)
Rename the parameter of i2c_get_adapter() to "nr", to make it clear we
are passing an adapter number and not an adapter ID (which have gone
away by now.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/i2c-core.c
include/linux/i2c.h

index 045ba6efea48fd24cbf651115e2d86a4f87781b4..f7620cada78206b35d55295888e76544b7b7eeab 100644 (file)
@@ -1581,12 +1581,12 @@ i2c_new_probed_device(struct i2c_adapter *adap,
 }
 EXPORT_SYMBOL_GPL(i2c_new_probed_device);
 
-struct i2c_adapter *i2c_get_adapter(int id)
+struct i2c_adapter *i2c_get_adapter(int nr)
 {
        struct i2c_adapter *adapter;
 
        mutex_lock(&core_lock);
-       adapter = idr_find(&i2c_adapter_idr, id);
+       adapter = idr_find(&i2c_adapter_idr, nr);
        if (adapter && !try_module_get(adapter->owner))
                adapter = NULL;
 
index 06a8d9c7de98765c3b73e1093c346de452c0fbd5..c1e70afe2502f6f63b01f70e6860a289325f6e34 100644 (file)
@@ -447,7 +447,7 @@ extern void i2c_release_client(struct i2c_client *client);
 extern void i2c_clients_command(struct i2c_adapter *adap,
                                unsigned int cmd, void *arg);
 
-extern struct i2c_adapter *i2c_get_adapter(int id);
+extern struct i2c_adapter *i2c_get_adapter(int nr);
 extern void i2c_put_adapter(struct i2c_adapter *adap);