The n_cols number has beed set to the right value in the board specific file,
so in the twl4030 driver, the n_cols doesn't need to plus 1.

Signed-off-by: Stanley.Miao <[EMAIL PROTECTED]>
---
 drivers/input/keyboard/omap-twl4030keypad.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/omap-twl4030keypad.c 
b/drivers/input/keyboard/omap-twl4030keypad.c
index 13c9c0a..21f922d 100644
--- a/drivers/input/keyboard/omap-twl4030keypad.c
+++ b/drivers/input/keyboard/omap-twl4030keypad.c
@@ -173,7 +173,7 @@ static void twl4030_kp_scan(struct omap_keypad *kp, int 
release_all)
                if (!changed)
                        continue;
 
-               for (col = 0; col < kp->n_cols + 1; col++) {
+               for (col = 0; col < kp->n_cols; col++) {
                        int key;
 
                        if (!(changed & (1 << col)))
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to