From 43b218416f10ad4ef7a68bc80070e91568fc3a48 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Sat, 3 Nov 2012 12:16:51 -0700 Subject: [PATCH] --- yaml --- r: 346933 b: refs/heads/master c: 4e99aab78ab2adf7645b7f58b2b549e6ea205dd7 h: refs/heads/master i: 346931: 6c6aff818f6d38aedb52974307ec365d2f728857 v: v3 --- [refs] | 2 +- trunk/drivers/input/keyboard/nomadik-ske-keypad.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 7c1955eeebb4..622916da47df 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6afdc289c984451a6202a687fe6af727e051a784 +refs/heads/master: 4e99aab78ab2adf7645b7f58b2b549e6ea205dd7 diff --git a/trunk/drivers/input/keyboard/nomadik-ske-keypad.c b/trunk/drivers/input/keyboard/nomadik-ske-keypad.c index 49f5fa64e0b1..95dcc9bdeec3 100644 --- a/trunk/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/trunk/drivers/input/keyboard/nomadik-ske-keypad.c @@ -287,14 +287,19 @@ static int __init ske_keypad_probe(struct platform_device *pdev) keypad->keymap, input); if (error) { dev_err(&pdev->dev, "Failed to build keymap\n"); - goto err_iounmap; + goto err_clk; } input_set_capability(input, EV_MSC, MSC_SCAN); if (!plat->no_autorepeat) __set_bit(EV_REP, input->evbit); - clk_enable(keypad->clk); + error = clk_prepare_enable(keypad->clk); + if (error) { + dev_err(&pdev->dev, "Failed to prepare/enable clk\n"); + goto err_clk; + } + /* go through board initialization helpers */ if (keypad->board->init) @@ -330,7 +335,8 @@ static int __init ske_keypad_probe(struct platform_device *pdev) err_free_irq: free_irq(keypad->irq, keypad); err_clk_disable: - clk_disable(keypad->clk); + clk_disable_unprepare(keypad->clk); +err_clk: clk_put(keypad->clk); err_iounmap: iounmap(keypad->reg_base); @@ -351,7 +357,7 @@ static int __devexit ske_keypad_remove(struct platform_device *pdev) input_unregister_device(keypad->input); - clk_disable(keypad->clk); + clk_disable_unprepare(keypad->clk); clk_put(keypad->clk); if (keypad->board->exit)