• Thomas Kavanagh's avatar
    i2c: algo: pca: Fix chip reset function for PCA9665 · a76e7c68
    Thomas Kavanagh authored
    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: default avatarThomas Kavanagh <tkavanagh@juniper.net>
    Signed-off-by: default avatarGuenter Roeck <groeck@juniper.net>
    Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
    a76e7c68
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt/kvm Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...