diff options
author | Matt Hsu <matt_hsu@openmoko.org> | 2009-02-09 13:03:30 +0000 |
---|---|---|
committer | Andy Green <agreen@octopus.localdomain> | 2009-02-09 13:03:30 +0000 |
commit | 76aad825a6ec29cfd1d9f6a4b94c591fb819e241 (patch) | |
tree | d9e5185e0373dfb3be90791037cc780fa7421e59 | |
parent | abe29c59c5f0af1184eaee94322b63ef4b95055f (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.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 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. |