mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
Input: ambakmi - [un]prepare clocks when enabling amd disabling
Clocks must be prepared before enabling and unprepared after disabling. Use appropriate functions to do this in one go. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
8669cf6793
commit
59d1f5c41a
1 changed files with 3 additions and 3 deletions
|
@ -72,7 +72,7 @@ static int amba_kmi_open(struct serio *io)
|
|||
unsigned int divisor;
|
||||
int ret;
|
||||
|
||||
ret = clk_enable(kmi->clk);
|
||||
ret = clk_prepare_enable(kmi->clk);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
|
@ -92,7 +92,7 @@ static int amba_kmi_open(struct serio *io)
|
|||
return 0;
|
||||
|
||||
clk_disable:
|
||||
clk_disable(kmi->clk);
|
||||
clk_disable_unprepare(kmi->clk);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ static void amba_kmi_close(struct serio *io)
|
|||
writeb(0, KMICR);
|
||||
|
||||
free_irq(kmi->irq, kmi);
|
||||
clk_disable(kmi->clk);
|
||||
clk_disable_unprepare(kmi->clk);
|
||||
}
|
||||
|
||||
static int __devinit amba_kmi_probe(struct amba_device *dev,
|
||||
|
|
Loading…
Reference in a new issue