diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2016-09-16 18:02:42 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-09-24 10:48:18 +0200 |
commit | 8dd1fe1594a712eb326e1607c694fbd1baf85f4b (patch) | |
tree | 2058f58e44b3ecd72aac347e308fbcffbbd77625 /drivers | |
parent | i2c: rk3x: Fix variable 'min_total_ns' unused warning (diff) | |
download | linux-8dd1fe1594a712eb326e1607c694fbd1baf85f4b.tar.xz linux-8dd1fe1594a712eb326e1607c694fbd1baf85f4b.zip |
i2c: export i2c_adapter_depth()
For crazy setups in which an i2c gpio expander is behind an i2c gpio
multiplexer controlled by a gpio provided a second expander using the
same device driver we need to explicitly tell lockdep how to handle
nested locking.
Export i2c_adapter_depth() as public API to be reused outside of i2c
core code.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Peter Rosin <peda@axentia.se>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/i2c-core.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index cdbbd9bdb7b4..981de21ab814 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1426,13 +1426,7 @@ static void i2c_adapter_dev_release(struct device *dev) complete(&adap->dev_released); } -/* - * This function is only needed for mutex_lock_nested, so it is never - * called unless locking correctness checking is enabled. Thus we - * make it inline to avoid a compiler warning. That's what gcc ends up - * doing anyway. - */ -static inline unsigned int i2c_adapter_depth(struct i2c_adapter *adapter) +unsigned int i2c_adapter_depth(struct i2c_adapter *adapter) { unsigned int depth = 0; @@ -1441,6 +1435,7 @@ static inline unsigned int i2c_adapter_depth(struct i2c_adapter *adapter) return depth; } +EXPORT_SYMBOL_GPL(i2c_adapter_depth); /* * Let users instantiate I2C devices through sysfs. This can be used when |