diff options
author | Gao Pan <b54642@freescale.com> | 2015-12-09 04:08:22 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-12-09 11:15:41 +0100 |
commit | 5212f9ae519a3e108205f27eb22929266e688e3e (patch) | |
tree | 8f947569ad080b363120ef13ac09cae35e362a6e /kernel/kexec.c | |
parent | i2c: do not use 0x in front of %pa (diff) | |
download | linux-5212f9ae519a3e108205f27eb22929266e688e3e.tar.xz linux-5212f9ae519a3e108205f27eb22929266e688e3e.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 'kernel/kexec.c')
0 files changed, 0 insertions, 0 deletions