omap-keypad: fix build warning
Subsystems (2)
PATCH 1/1 omap-keypad: fix build warning
From: David Brownell <[email protected]>
Build fixes:
drivers/input/keyboard/omap-keypad.c: In function 'omap_kp_probe':drivers/input/keyboard/omap-keypad.c:418: warning: 'row_idx' is used uninitialized in this function drivers/input/keyboard/omap-keypad.c:421: warning: 'col_idx' is used uninitialized in this function
These variables are useful when cpu_is_omap24xx(), and otherwise just for useless cleanup.
---
This has been in the OMAP tree since 24-Feb.
drivers/input/keyboard/omap-keypad.c | 3 +++ 1 files changed, 3 insertions(+)
drivers/input/keyboard/omap-keypad.c +3 -0
@@ -352,6 +352,9 @@ static int __init omap_kp_probe(struct p }omap_set_gpio_direction (row_gpios[row_idx],1 ); } + }else { + col_idx =0 ; + row_idx =0 ; }setup_timer (&omap_kp->timer, omap_kp_timer, (unsigned long )omap_kp);
Quoted 8 lines · David Brownell
From: David Brownell <[email protected]>
Build fixes:
drivers/input/keyboard/omap-keypad.c: In function 'omap_kp_probe':drivers/input/keyboard/omap-keypad.c:418: warning: 'row_idx' is used uninitialized in this functiondrivers/input/keyboard/omap-keypad.c:421: warning: 'col_idx' is used uninitialized in this function
Quoted 5 lines
These variables are useful when
cpu_is_omap24xx(), and otherwise just for useless cleanup.Signed-off-by David Brownell <[email protected]>Signed-off-by Tony Lindgren <[email protected]>
Applied, thank you David.
Signature · 1 line
Dmitry