diff options
author | Tai-hwa Liang <avatar@sentelic.com> | 2009-05-10 21:15:39 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-08-20 00:46:09 -0400 |
commit | fc69f4a6af49ee69475dc4217924d9edf77760e0 (patch) | |
tree | 2b200846dc0848e8fa85f439d9a1c98652356348 /drivers/input/serio/libps2.c | |
parent | 3b72094409ab673d096b3852f4636be540780faf (diff) |
Input: add new driver for Sentelic Finger Sensing Pad
This is the driver for Sentelic Finger Sensing Pad which can be found
on MSI WIND Netbook.
Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio/libps2.c')
-rw-r--r-- | drivers/input/serio/libps2.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index be5bbbb8ae4e..3a95b508bf27 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c | |||
@@ -161,7 +161,7 @@ static int ps2_adjust_timeout(struct ps2dev *ps2dev, int command, int timeout) | |||
161 | * ps2_command() can only be called from a process context | 161 | * ps2_command() can only be called from a process context |
162 | */ | 162 | */ |
163 | 163 | ||
164 | int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) | 164 | int __ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) |
165 | { | 165 | { |
166 | int timeout; | 166 | int timeout; |
167 | int send = (command >> 12) & 0xf; | 167 | int send = (command >> 12) & 0xf; |
@@ -179,8 +179,6 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) | |||
179 | return -1; | 179 | return -1; |
180 | } | 180 | } |
181 | 181 | ||
182 | mutex_lock(&ps2dev->cmd_mutex); | ||
183 | |||
184 | serio_pause_rx(ps2dev->serio); | 182 | serio_pause_rx(ps2dev->serio); |
185 | ps2dev->flags = command == PS2_CMD_GETID ? PS2_FLAG_WAITID : 0; | 183 | ps2dev->flags = command == PS2_CMD_GETID ? PS2_FLAG_WAITID : 0; |
186 | ps2dev->cmdcnt = receive; | 184 | ps2dev->cmdcnt = receive; |
@@ -231,7 +229,18 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) | |||
231 | ps2dev->flags = 0; | 229 | ps2dev->flags = 0; |
232 | serio_continue_rx(ps2dev->serio); | 230 | serio_continue_rx(ps2dev->serio); |
233 | 231 | ||
232 | return rc; | ||
233 | } | ||
234 | EXPORT_SYMBOL(__ps2_command); | ||
235 | |||
236 | int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) | ||
237 | { | ||
238 | int rc; | ||
239 | |||
240 | mutex_lock(&ps2dev->cmd_mutex); | ||
241 | rc = __ps2_command(ps2dev, param, command); | ||
234 | mutex_unlock(&ps2dev->cmd_mutex); | 242 | mutex_unlock(&ps2dev->cmd_mutex); |
243 | |||
235 | return rc; | 244 | return rc; |
236 | } | 245 | } |
237 | EXPORT_SYMBOL(ps2_command); | 246 | EXPORT_SYMBOL(ps2_command); |