Commit aba828ce authored by Thomas Abraham's avatar Thomas Abraham Committed by Dmitry Torokhov

Input: samsung-keypad - add clk_prepare and clk_unprepare

Add calls to clk_prepare and clk_unprepare as required by commom clock
framework.
Signed-off-by: default avatarThomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent eb007c86
...@@ -431,6 +431,12 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev) ...@@ -431,6 +431,12 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev)
goto err_unmap_base; goto err_unmap_base;
} }
error = clk_prepare(keypad->clk);
if (error) {
dev_err(&pdev->dev, "keypad clock prepare failed\n");
goto err_put_clk;
}
keypad->input_dev = input_dev; keypad->input_dev = input_dev;
keypad->pdev = pdev; keypad->pdev = pdev;
keypad->row_shift = row_shift; keypad->row_shift = row_shift;
...@@ -461,7 +467,7 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev) ...@@ -461,7 +467,7 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev)
keypad->keycodes, input_dev); keypad->keycodes, input_dev);
if (error) { if (error) {
dev_err(&pdev->dev, "failed to build keymap\n"); dev_err(&pdev->dev, "failed to build keymap\n");
goto err_put_clk; goto err_unprepare_clk;
} }
input_set_capability(input_dev, EV_MSC, MSC_SCAN); input_set_capability(input_dev, EV_MSC, MSC_SCAN);
...@@ -503,6 +509,8 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev) ...@@ -503,6 +509,8 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
device_init_wakeup(&pdev->dev, 0); device_init_wakeup(&pdev->dev, 0);
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
err_unprepare_clk:
clk_unprepare(keypad->clk);
err_put_clk: err_put_clk:
clk_put(keypad->clk); clk_put(keypad->clk);
samsung_keypad_dt_gpio_free(keypad); samsung_keypad_dt_gpio_free(keypad);
...@@ -531,6 +539,7 @@ static int __devexit samsung_keypad_remove(struct platform_device *pdev) ...@@ -531,6 +539,7 @@ static int __devexit samsung_keypad_remove(struct platform_device *pdev)
*/ */
free_irq(keypad->irq, keypad); free_irq(keypad->irq, keypad);
clk_unprepare(keypad->clk);
clk_put(keypad->clk); clk_put(keypad->clk);
samsung_keypad_dt_gpio_free(keypad); samsung_keypad_dt_gpio_free(keypad);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment