Gao Pan 5212f9ae51 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
2015-12-09 11:15:41 +01:00
..
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2015-07-31 13:32:31 +02:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2015-08-10 08:37:29 +02:00
2014-12-14 16:10:09 -08:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-12-14 16:10:09 -08:00
2015-08-24 14:05:18 +02:00
2015-03-27 16:53:41 +01:00
2015-05-12 18:27:48 +02:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2015-08-10 08:37:33 +02:00
2015-08-10 08:37:28 +02:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-12-14 16:10:09 -08:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2015-12-01 02:01:27 +01:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-12-14 16:10:09 -08:00