aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2007-10-02 09:47:40 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-10-04 16:47:23 -0400
commitda1bb3a0e1f7f9cabe70fb2c41b47fa57c42fdfd (patch)
treefca0a59724aba282128f5a0dec79630cf532306c
parent15f8c604a79c4840ed76eecf3af5d88b7c1dee9e (diff)
[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>
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 4a1645691fb1..91987e000d25 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -363,7 +363,7 @@ static void __init of_register_i2c_devices(struct device_node *adap_node,
363 struct device_node *node = NULL; 363 struct device_node *node = NULL;
364 364
365 while ((node = of_get_next_child(adap_node, node))) { 365 while ((node = of_get_next_child(adap_node, node))) {
366 struct i2c_board_info info; 366 struct i2c_board_info info = {};
367 const u32 *addr; 367 const u32 *addr;
368 int len; 368 int len;
369 369
@@ -380,7 +380,6 @@ static void __init of_register_i2c_devices(struct device_node *adap_node,
380 if (of_find_i2c_driver(node, &info) < 0) 380 if (of_find_i2c_driver(node, &info) < 0)
381 continue; 381 continue;
382 382
383 info.platform_data = NULL;
384 info.addr = *addr; 383 info.addr = *addr;
385 384
386 i2c_register_board_info(bus_num, &info, 1); 385 i2c_register_board_info(bus_num, &info, 1);