Patch "i2c: mux: Avoid potential false error message in i2c_mux_add_adapter" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    i2c: mux: Avoid potential false error message in i2c_mux_add_adapter

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     i2c-mux-avoid-potential-false-error-message-in-i2c_m.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5091c9bc533da515742df5c19c2336c1e6d9ef20
Author: Heiner Kallweit <hkallweit1@xxxxxxxxx>
Date:   Sat Sep 23 23:54:06 2023 +0200

    i2c: mux: Avoid potential false error message in i2c_mux_add_adapter
    
    [ Upstream commit b13e59e74ff71a1004e0508107e91e9a84fd7388 ]
    
    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@xxxxxxxxx>
    Acked-by: Peter Rosin <peda@xxxxxxxxxx>
    Signed-off-by: Wolfram Sang <wsa@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
index 313904be5f3bd..57ff09f18c371 100644
--- a/drivers/i2c/i2c-mux.c
+++ b/drivers/i2c/i2c-mux.c
@@ -341,7 +341,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
 		priv->adap.lock_ops = &i2c_parent_lock_ops;
 
 	/* 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,
 			"Segment %d behind mux can't share classes with ancestors\n",
 			chan_id);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux