Merge branch 'i2c/for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[muen/linux.git] / drivers / i2c / i2c-core-base.c
index 043c4aadaa44c2665fa559a29bf65b4c5900bf74..5a937109a28915283132fea276dc671a35cc74f3 100644 (file)
@@ -637,7 +637,7 @@ static int i2c_check_addr_busy(struct i2c_adapter *adapter, int addr)
 static void i2c_adapter_lock_bus(struct i2c_adapter *adapter,
                                 unsigned int flags)
 {
-       rt_mutex_lock(&adapter->bus_lock);
+       rt_mutex_lock_nested(&adapter->bus_lock, i2c_adapter_depth(adapter));
 }
 
 /**