aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-core.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-03-20 09:50:52 -0400
committerJean Delvare <khali@endymion.delvare>2011-03-20 09:50:52 -0400
commitd735b34db30b7891ff76b552d18ecb0ce04a2bc2 (patch)
tree5918a83db26444ee3e42fa9824efb54995abf0bd /drivers/i2c/i2c-core.c
parent6ced9e6b3901af4ab6ac0a11231402c888286ea6 (diff)
i2c: make i2c_get_adapter prototype clearer
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>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r--drivers/i2c/i2c-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 045ba6efea48..f7620cada782 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1581,12 +1581,12 @@ i2c_new_probed_device(struct i2c_adapter *adap,
1581} 1581}
1582EXPORT_SYMBOL_GPL(i2c_new_probed_device); 1582EXPORT_SYMBOL_GPL(i2c_new_probed_device);
1583 1583
1584struct i2c_adapter *i2c_get_adapter(int id) 1584struct i2c_adapter *i2c_get_adapter(int nr)
1585{ 1585{
1586 struct i2c_adapter *adapter; 1586 struct i2c_adapter *adapter;
1587 1587
1588 mutex_lock(&core_lock); 1588 mutex_lock(&core_lock);
1589 adapter = idr_find(&i2c_adapter_idr, id); 1589 adapter = idr_find(&i2c_adapter_idr, nr);
1590 if (adapter && !try_module_get(adapter->owner)) 1590 if (adapter && !try_module_get(adapter->owner))
1591 adapter = NULL; 1591 adapter = NULL;
1592 1592