Commit d735b34d authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare

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: default avatarJean Delvare <khali@linux-fr.org>
parent 6ced9e6b
...@@ -1581,12 +1581,12 @@ i2c_new_probed_device(struct i2c_adapter *adap, ...@@ -1581,12 +1581,12 @@ i2c_new_probed_device(struct i2c_adapter *adap,
} }
EXPORT_SYMBOL_GPL(i2c_new_probed_device); 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; struct i2c_adapter *adapter;
mutex_lock(&core_lock); 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)) if (adapter && !try_module_get(adapter->owner))
adapter = NULL; adapter = NULL;
......
...@@ -447,7 +447,7 @@ extern void i2c_release_client(struct i2c_client *client); ...@@ -447,7 +447,7 @@ extern void i2c_release_client(struct i2c_client *client);
extern void i2c_clients_command(struct i2c_adapter *adap, extern void i2c_clients_command(struct i2c_adapter *adap,
unsigned int cmd, void *arg); 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); extern void i2c_put_adapter(struct i2c_adapter *adap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment