projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
i2c: add a warning to i2c_adapter_depth()
[cascardo/linux.git]
/
drivers
/
i2c
/
i2c-core.c
diff --git
a/drivers/i2c/i2c-core.c
b/drivers/i2c/i2c-core.c
index
981de21
..
98fffa3
100644
(file)
--- a/
drivers/i2c/i2c-core.c
+++ b/
drivers/i2c/i2c-core.c
@@
-1433,6
+1433,9
@@
unsigned int i2c_adapter_depth(struct i2c_adapter *adapter)
while ((adapter = i2c_parent_is_i2c_adapter(adapter)))
depth++;
+ WARN_ONCE(depth >= MAX_LOCKDEP_SUBCLASSES,
+ "adapter depth exceeds lockdep subclass limit\n");
+
return depth;
}
EXPORT_SYMBOL_GPL(i2c_adapter_depth);