aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@arm.com>2012-09-19 14:10:47 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-09-19 17:56:36 -0400
commit59d1f5c41a21f0d87973f2dedd40efd927a201d6 (patch)
treee2365b17acfe93b5716ece0921fdb5b4bd0be19a /drivers
parent8669cf6793bb38307a30fb6b9565ddc8840ebd3f (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/serio/ambakmi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 2ffd110bd5bc..2e77246c2e5a 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -72,7 +72,7 @@ static int amba_kmi_open(struct serio *io)
72 unsigned int divisor; 72 unsigned int divisor;
73 int ret; 73 int ret;
74 74
75 ret = clk_enable(kmi->clk); 75 ret = clk_prepare_enable(kmi->clk);
76 if (ret) 76 if (ret)
77 goto out; 77 goto out;
78 78
@@ -92,7 +92,7 @@ static int amba_kmi_open(struct serio *io)
92 return 0; 92 return 0;
93 93
94 clk_disable: 94 clk_disable:
95 clk_disable(kmi->clk); 95 clk_disable_unprepare(kmi->clk);
96 out: 96 out:
97 return ret; 97 return ret;
98} 98}
@@ -104,7 +104,7 @@ static void amba_kmi_close(struct serio *io)
104 writeb(0, KMICR); 104 writeb(0, KMICR);
105 105
106 free_irq(kmi->irq, kmi); 106 free_irq(kmi->irq, kmi);
107 clk_disable(kmi->clk); 107 clk_disable_unprepare(kmi->clk);
108} 108}
109 109
110static int __devinit amba_kmi_probe(struct amba_device *dev, 110static int __devinit amba_kmi_probe(struct amba_device *dev,