From f341301a48845ac76fd8c8cff4b7a338313bf0ac Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 14 Apr 2011 13:39:02 -0400 Subject: [PATCH] i2c-algo-bit: don't make bit_test fatal Some distros apparently set i2c-algo-bit.bit_test to 1 by default. In some cases this causes i2c_bit_add_bus to fail and prevents the i2c bus from being added. In the radeon case, we fail to add the ddc i2c buses which prevents the driver from being able to detect a monitor. The i2c bus works fine even if bit_test fails. This is likely due to gpio switching that is required and handled in the pre/post_xfer hooks. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=36221 Cc: Jean Delvare Signed-off-by: Alex Deucher --- drivers/i2c/algos/i2c-algo-bit.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index 38319a6..5d7e718 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c @@ -608,8 +608,6 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap, if (bit_test) { ret = test_bus(bit_adap, adap->name); - if (ret < 0) - return -ENODEV; } /* register new adapter to i2c module... */ -- 1.7.1.1