diff options
author | Vipul Kumar Samar <vipulkumar.samar@st.com> | 2012-11-26 11:50:08 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-11-28 01:38:32 -0500 |
commit | 9336648978c2e9de9bf3c026918db386ace19a86 (patch) | |
tree | e91ab6adbb76a9f93f6e4606dde2ee3c5594c2d6 | |
parent | 92aab96034c2cdf11eb61a6b14409c2da8e5158d (diff) |
Input: spear-keyboard - add clk_{un}prepare() support
clk_{un}prepare is mandatory for platforms using common clock framework.
Because for SPEAr we don't do anything in clk_{un}prepare() calls, just
call them once in probe/remove.
Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/keyboard/spear-keyboard.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index d70093bef740..695d237417d6 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c | |||
@@ -267,9 +267,14 @@ static int spear_kbd_probe(struct platform_device *pdev) | |||
267 | return error; | 267 | return error; |
268 | } | 268 | } |
269 | 269 | ||
270 | error = clk_prepare(kbd->clk); | ||
271 | if (error) | ||
272 | return error; | ||
273 | |||
270 | error = input_register_device(input_dev); | 274 | error = input_register_device(input_dev); |
271 | if (error) { | 275 | if (error) { |
272 | dev_err(&pdev->dev, "Unable to register keyboard device\n"); | 276 | dev_err(&pdev->dev, "Unable to register keyboard device\n"); |
277 | clk_unprepare(kbd->clk); | ||
273 | return error; | 278 | return error; |
274 | } | 279 | } |
275 | 280 | ||
@@ -281,6 +286,11 @@ static int spear_kbd_probe(struct platform_device *pdev) | |||
281 | 286 | ||
282 | static int spear_kbd_remove(struct platform_device *pdev) | 287 | static int spear_kbd_remove(struct platform_device *pdev) |
283 | { | 288 | { |
289 | struct spear_kbd *kbd = platform_get_drvdata(pdev); | ||
290 | |||
291 | input_unregister_device(kbd->input); | ||
292 | clk_unprepare(kbd->clk); | ||
293 | |||
284 | device_init_wakeup(&pdev->dev, 0); | 294 | device_init_wakeup(&pdev->dev, 0); |
285 | platform_set_drvdata(pdev, NULL); | 295 | platform_set_drvdata(pdev, NULL); |
286 | 296 | ||