diff options
author | Gao Pan <b54642@freescale.com> | 2015-12-09 04:08:22 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-01-03 19:06:50 +0100 |
commit | a5f650182bcf956b2b0341575e8bff01e402224f (patch) | |
tree | 379b9a84ff590a2b7113b606bf2cbc359086143e /drivers/i2c/busses/i2c-nforce2-s4985.c | |
parent | i2c: rcar: disable PM in multi-master mode (diff) | |
download | linux-a5f650182bcf956b2b0341575e8bff01e402224f.tar.xz linux-a5f650182bcf956b2b0341575e8bff01e402224f.zip |
i2c: imx: init bus recovery info before adding i2c adapter
During driver probe, i2c_imx_init_recovery_info() must come before
i2c_add_numbered_adapter(), because the get/set_scl() functions
are assigned in i2c_register_adapter() under the conditon that bus
recover_info are initialized. Otherwise, get/set_scl() function
pointers never get assigned.
In such case, when i2c_generic_gpio_recovery() is used for bus recovery,
there will be kernel crash because bri->set_scl is NULL.
The solution to this bug is moving i2c_imx_init_recovery_info() before
i2c_register_adapter().
Signed-off-by: Gao Pan <b54642@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Diffstat (limited to 'drivers/i2c/busses/i2c-nforce2-s4985.c')
0 files changed, 0 insertions, 0 deletions