linux/drivers/i2c/algos
Thomas Kavanagh a76e7c6821 i2c: algo: pca: Fix chip reset function for PCA9665
The parameter passed to pca9665_reset is adap->data (which is bus driver
specific), not i2c_algp_pca_data *adap. pca9665_reset expects it to be
i2c_algp_pca_data *adap. All other wrappers from the algo call back to
the bus driver, which knows to handle its custom data. Only pca9665_reset
resides inside the algorithm code and does not know how to handle a custom
data structure. This can result in a kernel crash.

Fix by re-factoring pca_reset() from a macro to a function handling chip
specific code, and only call adap->reset_chip() if the chip is not PCA9665.

Signed-off-by: Thomas Kavanagh <tkavanagh@juniper.net>
Signed-off-by: Guenter Roeck <groeck@juniper.net>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-10-06 13:14:36 +02:00
..
i2c-algo-bit.c i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
i2c-algo-pca.c i2c: algo: pca: Fix chip reset function for PCA9665 2012-10-06 13:14:36 +02:00
i2c-algo-pcf.c i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
i2c-algo-pcf.h i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
Kconfig i2c/algos: convert Kconfig to use the menu's `visible' keyword 2010-11-22 11:27:35 -02:00
Makefile i2c: Change to new flag variable 2010-10-24 18:16:58 +02:00