Input: ep93xx_keypad - prepare clock before using it
Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch to Common Clock Framework. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://lore.kernel.org/r/20210613233041.128961-4-alexander.sverdlin@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
a5b84e4e4f
commit
62e4fe9f60
@ -157,7 +157,7 @@ static int ep93xx_keypad_open(struct input_dev *pdev)
|
|||||||
|
|
||||||
if (!keypad->enabled) {
|
if (!keypad->enabled) {
|
||||||
ep93xx_keypad_config(keypad);
|
ep93xx_keypad_config(keypad);
|
||||||
clk_enable(keypad->clk);
|
clk_prepare_enable(keypad->clk);
|
||||||
keypad->enabled = true;
|
keypad->enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ static void ep93xx_keypad_close(struct input_dev *pdev)
|
|||||||
struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
|
struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
|
||||||
|
|
||||||
if (keypad->enabled) {
|
if (keypad->enabled) {
|
||||||
clk_disable(keypad->clk);
|
clk_disable_unprepare(keypad->clk);
|
||||||
keypad->enabled = false;
|
keypad->enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user