mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
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>
This commit is contained in:
parent
92aab96034
commit
9336648978
@ -267,9 +267,14 @@ static int spear_kbd_probe(struct platform_device *pdev)
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error = clk_prepare(kbd->clk);
|
||||||
|
if (error)
|
||||||
|
return error;
|
||||||
|
|
||||||
error = input_register_device(input_dev);
|
error = input_register_device(input_dev);
|
||||||
if (error) {
|
if (error) {
|
||||||
dev_err(&pdev->dev, "Unable to register keyboard device\n");
|
dev_err(&pdev->dev, "Unable to register keyboard device\n");
|
||||||
|
clk_unprepare(kbd->clk);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,6 +286,11 @@ static int spear_kbd_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
static int spear_kbd_remove(struct platform_device *pdev)
|
static int spear_kbd_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
|
struct spear_kbd *kbd = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
|
input_unregister_device(kbd->input);
|
||||||
|
clk_unprepare(kbd->clk);
|
||||||
|
|
||||||
device_init_wakeup(&pdev->dev, 0);
|
device_init_wakeup(&pdev->dev, 0);
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user