Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334088
b: refs/heads/master
c: aba828c
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Abraham authored and Dmitry Torokhov committed Oct 5, 2012
1 parent f797016 commit 304e1ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb007c8677a9b00e6bd24d1c3e161b3209fcd3be
refs/heads/master: aba828cee24f48bc93a661aaa18caea301786f3e
11 changes: 10 additions & 1 deletion trunk/drivers/input/keyboard/samsung-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,12 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev)
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->pdev = pdev;
keypad->row_shift = row_shift;
Expand Down Expand Up @@ -461,7 +467,7 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev)
keypad->keycodes, input_dev);
if (error) {
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);
Expand Down Expand Up @@ -503,6 +509,8 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
device_init_wakeup(&pdev->dev, 0);
platform_set_drvdata(pdev, NULL);
err_unprepare_clk:
clk_unprepare(keypad->clk);
err_put_clk:
clk_put(keypad->clk);
samsung_keypad_dt_gpio_free(keypad);
Expand Down Expand Up @@ -531,6 +539,7 @@ static int __devexit samsung_keypad_remove(struct platform_device *pdev)
*/
free_irq(keypad->irq, keypad);

clk_unprepare(keypad->clk);
clk_put(keypad->clk);
samsung_keypad_dt_gpio_free(keypad);

Expand Down

0 comments on commit 304e1ba

Please sign in to comment.