[PATCH] This patch fixes the following items on pcap7200 driver,

Matt Hsu matt_hsu at openmoko.org
Mon Feb 9 06:01:28 CET 2009


-do the parameter check of setting operating mode.
-add device haeder file.

Signed-off-by: Matt Hsu <matt_hsu at openmoko.org>
---
 drivers/input/touchscreen/pcap7200_ts.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/input/touchscreen/pcap7200_ts.c b/drivers/input/touchscreen/pcap7200_ts.c
index 70f7d89..73e29b8 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.
-- 
1.5.6.5




More information about the openmoko-kernel mailing list