[POWERPC] fsl_soc: fix uninitialized i2c_board_info structure
i2c_board_info used semi-initialized, causing garbage in the info->flags, and that, in turn, causes various symptoms of i2c malfunctioning, like PEC mismatches. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
committed by
Kumar Gala
parent
15f8c604a7
commit
da1bb3a0e1
@@ -363,7 +363,7 @@ static void __init of_register_i2c_devices(struct device_node *adap_node,
|
|||||||
struct device_node *node = NULL;
|
struct device_node *node = NULL;
|
||||||
|
|
||||||
while ((node = of_get_next_child(adap_node, node))) {
|
while ((node = of_get_next_child(adap_node, node))) {
|
||||||
struct i2c_board_info info;
|
struct i2c_board_info info = {};
|
||||||
const u32 *addr;
|
const u32 *addr;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
@@ -380,7 +380,6 @@ static void __init of_register_i2c_devices(struct device_node *adap_node,
|
|||||||
if (of_find_i2c_driver(node, &info) < 0)
|
if (of_find_i2c_driver(node, &info) < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
info.platform_data = NULL;
|
|
||||||
info.addr = *addr;
|
info.addr = *addr;
|
||||||
|
|
||||||
i2c_register_board_info(bus_num, &info, 1);
|
i2c_register_board_info(bus_num, &info, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user