aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Hsu <matt_hsu@openmoko.org>2009-02-09 13:03:30 +0000
committerAndy Green <agreen@octopus.localdomain>2009-02-09 13:03:30 +0000
commit76aad825a6ec29cfd1d9f6a4b94c591fb819e241 (patch)
treed9e5185e0373dfb3be90791037cc780fa7421e59
parentabe29c59c5f0af1184eaee94322b63ef4b95055f (diff)
This patch fixes the following items on pcap7200 driver,
-do the parameter check of setting operating mode. -add device haeder file. Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>
-rw-r--r--drivers/input/touchscreen/pcap7200_ts.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/pcap7200_ts.c b/drivers/input/touchscreen/pcap7200_ts.c
index 70f7d8935d9..73e29b84d55 100644
--- a/drivers/input/touchscreen/pcap7200_ts.c
+++ b/drivers/input/touchscreen/pcap7200_ts.c
@@ -24,6 +24,7 @@
#include <linux/interrupt.h>
#include <linux/workqueue.h>
#include <linux/input.h>
+#include <linux/device.h>
#include <linux/pcap7200.h>
#include <../drivers/input/touchscreen/ts_filter.h>
@@ -114,6 +115,8 @@ static int __set_op_mode(struct pcap7200_data *pcap, u_int8_t val)
mutex_lock(&pcap->lock);
+ val = val & 0x03;
+
/* this chip has an issue.
* you need to give wakeup call for 3 times if it's
* in sleep mode.