diff options
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/ambakmi.c | 15 | ||||
-rw-r--r-- | drivers/input/serio/sa1111ps2.c | 1 | ||||
-rw-r--r-- | drivers/input/serio/serport.c | 13 |
3 files changed, 5 insertions, 24 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) |
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c index 3f0df3330fb2..ebd9976fc811 100644 --- a/drivers/input/serio/sa1111ps2.c +++ b/drivers/input/serio/sa1111ps2.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | 21 | ||
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/irq.h> | ||
24 | #include <asm/system.h> | 23 | #include <asm/system.h> |
25 | 24 | ||
26 | #include <asm/hardware/sa1111.h> | 25 | #include <asm/hardware/sa1111.h> |
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c index 1bd88fca0542..54a680cc704d 100644 --- a/drivers/input/serio/serport.c +++ b/drivers/input/serio/serport.c | |||
@@ -96,6 +96,7 @@ static int serport_ldisc_open(struct tty_struct *tty) | |||
96 | init_waitqueue_head(&serport->wait); | 96 | init_waitqueue_head(&serport->wait); |
97 | 97 | ||
98 | tty->disc_data = serport; | 98 | tty->disc_data = serport; |
99 | tty->receive_room = 256; | ||
99 | set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); | 100 | set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); |
100 | 101 | ||
101 | return 0; | 102 | return 0; |
@@ -140,17 +141,6 @@ out: | |||
140 | } | 141 | } |
141 | 142 | ||
142 | /* | 143 | /* |
143 | * serport_ldisc_room() reports how much room we do have for receiving data. | ||
144 | * Although we in fact have infinite room, we need to specify some value | ||
145 | * here, and 256 seems to be reasonable. | ||
146 | */ | ||
147 | |||
148 | static int serport_ldisc_room(struct tty_struct *tty) | ||
149 | { | ||
150 | return 256; | ||
151 | } | ||
152 | |||
153 | /* | ||
154 | * serport_ldisc_read() just waits indefinitely if everything goes well. | 144 | * serport_ldisc_read() just waits indefinitely if everything goes well. |
155 | * However, when the serio driver closes the serio port, it finishes, | 145 | * However, when the serio driver closes the serio port, it finishes, |
156 | * returning 0 characters. | 146 | * returning 0 characters. |
@@ -237,7 +227,6 @@ static struct tty_ldisc serport_ldisc = { | |||
237 | .read = serport_ldisc_read, | 227 | .read = serport_ldisc_read, |
238 | .ioctl = serport_ldisc_ioctl, | 228 | .ioctl = serport_ldisc_ioctl, |
239 | .receive_buf = serport_ldisc_receive, | 229 | .receive_buf = serport_ldisc_receive, |
240 | .receive_room = serport_ldisc_room, | ||
241 | .write_wakeup = serport_ldisc_write_wakeup | 230 | .write_wakeup = serport_ldisc_write_wakeup |
242 | }; | 231 | }; |
243 | 232 | ||