Skip to content

Commit b13e59e

Browse files
hkallweitwsakernel
authored andcommitted
i2c: mux: Avoid potential false error message in i2c_mux_add_adapter
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>
1 parent f5d19bb commit b13e59e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/i2c-mux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
341341
priv->adap.lock_ops = &i2c_parent_lock_ops;
342342

343343
/* Sanity check on class */
344-
if (i2c_mux_parent_classes(parent) & class)
344+
if (i2c_mux_parent_classes(parent) & class & ~I2C_CLASS_DEPRECATED)
345345
dev_err(&parent->dev,
346346
"Segment %d behind mux can't share classes with ancestors\n",
347347
chan_id);

0 commit comments

Comments
 (0)