diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/samsung-keypad.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index 277e26dc910..9d7a111486f 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c | |||
@@ -431,6 +431,12 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev) | |||
431 | goto err_unmap_base; | 431 | goto err_unmap_base; |
432 | } | 432 | } |
433 | 433 | ||
434 | error = clk_prepare(keypad->clk); | ||
435 | if (error) { | ||
436 | dev_err(&pdev->dev, "keypad clock prepare failed\n"); | ||
437 | goto err_put_clk; | ||
438 | } | ||
439 | |||
434 | keypad->input_dev = input_dev; | 440 | keypad->input_dev = input_dev; |
435 | keypad->pdev = pdev; | 441 | keypad->pdev = pdev; |
436 | keypad->row_shift = row_shift; | 442 | keypad->row_shift = row_shift; |
@@ -461,7 +467,7 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev) | |||
461 | keypad->keycodes, input_dev); | 467 | keypad->keycodes, input_dev); |
462 | if (error) { | 468 | if (error) { |
463 | dev_err(&pdev->dev, "failed to build keymap\n"); | 469 | dev_err(&pdev->dev, "failed to build keymap\n"); |
464 | goto err_put_clk; | 470 | goto err_unprepare_clk; |
465 | } | 471 | } |
466 | 472 | ||
467 | input_set_capability(input_dev, EV_MSC, MSC_SCAN); | 473 | input_set_capability(input_dev, EV_MSC, MSC_SCAN); |
@@ -503,6 +509,8 @@ err_free_irq: | |||
503 | pm_runtime_disable(&pdev->dev); | 509 | pm_runtime_disable(&pdev->dev); |
504 | device_init_wakeup(&pdev->dev, 0); | 510 | device_init_wakeup(&pdev->dev, 0); |
505 | platform_set_drvdata(pdev, NULL); | 511 | platform_set_drvdata(pdev, NULL); |
512 | err_unprepare_clk: | ||
513 | clk_unprepare(keypad->clk); | ||
506 | err_put_clk: | 514 | err_put_clk: |
507 | clk_put(keypad->clk); | 515 | clk_put(keypad->clk); |
508 | samsung_keypad_dt_gpio_free(keypad); | 516 | samsung_keypad_dt_gpio_free(keypad); |
@@ -531,6 +539,7 @@ static int __devexit samsung_keypad_remove(struct platform_device *pdev) | |||
531 | */ | 539 | */ |
532 | free_irq(keypad->irq, keypad); | 540 | free_irq(keypad->irq, keypad); |
533 | 541 | ||
542 | clk_unprepare(keypad->clk); | ||
534 | clk_put(keypad->clk); | 543 | clk_put(keypad->clk); |
535 | samsung_keypad_dt_gpio_free(keypad); | 544 | samsung_keypad_dt_gpio_free(keypad); |
536 | 545 | ||