aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/ambakmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio/ambakmi.c')
-rw-r--r--drivers/input/serio/ambakmi.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 9b1ab5e7a98d..d847ed51cfb1 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -72,13 +72,9 @@ 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_use(kmi->clk);
76 if (ret)
77 goto out;
78
79 ret = clk_enable(kmi->clk); 75 ret = clk_enable(kmi->clk);
80 if (ret) 76 if (ret)
81 goto clk_unuse; 77 goto out;
82 78
83 divisor = clk_get_rate(kmi->clk) / 8000000 - 1; 79 divisor = clk_get_rate(kmi->clk) / 8000000 - 1;
84 writeb(divisor, KMICLKDIV); 80 writeb(divisor, KMICLKDIV);
@@ -97,8 +93,6 @@ static int amba_kmi_open(struct serio *io)
97 93
98 clk_disable: 94 clk_disable:
99 clk_disable(kmi->clk); 95 clk_disable(kmi->clk);
100 clk_unuse:
101 clk_unuse(kmi->clk);
102 out: 96 out:
103 return ret; 97 return ret;
104} 98}
@@ -111,7 +105,6 @@ static void amba_kmi_close(struct serio *io)
111 105
112 free_irq(kmi->irq, kmi); 106 free_irq(kmi->irq, kmi);
113 clk_disable(kmi->clk); 107 clk_disable(kmi->clk);
114 clk_unuse(kmi->clk);
115} 108}
116 109
117static int amba_kmi_probe(struct amba_device *dev, void *id) 110static int amba_kmi_probe(struct amba_device *dev, void *id)