mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
i2c: mux: Avoid potential false error message in i2c_mux_add_adapter
[ Upstream commit b13e59e74f
]
I2C_CLASS_DEPRECATED is a flag and not an actual class.
There's nothing speaking against both, parent and child, having
I2C_CLASS_DEPRECATED set. Therefore exclude it from the check.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
febcad3d32
commit
6133f63d4d
1 changed files with 1 additions and 1 deletions
|
@ -341,7 +341,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
|
||||||
priv->adap.lock_ops = &i2c_parent_lock_ops;
|
priv->adap.lock_ops = &i2c_parent_lock_ops;
|
||||||
|
|
||||||
/* Sanity check on class */
|
/* Sanity check on class */
|
||||||
if (i2c_mux_parent_classes(parent) & class)
|
if (i2c_mux_parent_classes(parent) & class & ~I2C_CLASS_DEPRECATED)
|
||||||
dev_err(&parent->dev,
|
dev_err(&parent->dev,
|
||||||
"Segment %d behind mux can't share classes with ancestors\n",
|
"Segment %d behind mux can't share classes with ancestors\n",
|
||||||
chan_id);
|
chan_id);
|
||||||
|
|
Loading…
Reference in a new issue