diff options
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/ambakmi.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 9b1ab5e7a98d..3df5eedf8f31 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c | |||
@@ -19,12 +19,12 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/amba/bus.h> | ||
23 | #include <linux/amba/kmi.h> | ||
24 | #include <linux/clk.h> | ||
22 | 25 | ||
23 | #include <asm/io.h> | 26 | #include <asm/io.h> |
24 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
25 | #include <asm/hardware/amba.h> | ||
26 | #include <asm/hardware/amba_kmi.h> | ||
27 | #include <asm/hardware/clock.h> | ||
28 | 28 | ||
29 | #define KMI_BASE (kmi->base) | 29 | #define KMI_BASE (kmi->base) |
30 | 30 | ||
@@ -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 | ||
117 | static int amba_kmi_probe(struct amba_device *dev, void *id) | 110 | static int amba_kmi_probe(struct amba_device *dev, void *id) |