From b3bf602cf4242107644a355eb29c18a2bd4e9f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kele=C5=9F?= Date: Thu, 11 Dec 2014 11:09:28 +0200 Subject: [PATCH] linux panic on A20 at this function: sw_keypad_set_mclk ke_used is wrong. --- drivers/input/keyboard/sun4i-keypad.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/sun4i-keypad.c b/drivers/input/keyboard/sun4i-keypad.c index 5e84c68565eb9b..a245c7fb394a45 100644 --- a/drivers/input/keyboard/sun4i-keypad.c +++ b/drivers/input/keyboard/sun4i-keypad.c @@ -400,13 +400,13 @@ static int __devinit sw_keypad_probe(struct platform_device *pdev) } disable_irq(keypad->irq); + platform_set_drvdata(pdev, keypad); + keypad->pdev = pdev; + error = input_register_device(keypad->input_dev); if (error) goto err_free_irq; - platform_set_drvdata(pdev, keypad); - keypad->pdev = pdev; - swkp_msg("sw keypad probe done, base %p, irq %d\n", keypad->base, keypad->irq); return 0; @@ -528,7 +528,7 @@ static int __init sw_keypad_init(void) swkp_msg("sw keypad init\n"); kp_used = 0; - ret = script_parser_fetch("keypad_para", "ke_used", &kp_used, sizeof(int)); + ret = script_parser_fetch("keypad_para", "kp_used", &kp_used, sizeof(int)); if (ret) { printk("sw keypad fetch keypad uning configuration failed\n");