diff mbox

[3/4] Input: ads7846 - restore ADC to powerdown mode if no messgaes needed

Message ID 1284634286-8871-4-git-send-email-jason77.wang@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jason Wang Sept. 16, 2010, 10:51 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 5ddaeea..eab8b0b 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -729,7 +729,8 @@  static void ads7846_read_state(struct ads7846 *ts)
 
 			case ADS7846_FILTER_IGNORE:
 				packet->tc.ignore = true;
-				return;
+				msg_idx = ts->msg_count - 1;
+				continue;
 
 			case ADS7846_FILTER_OK:
 				ads7846_update_value(m, val);
@@ -740,6 +741,8 @@  static void ads7846_read_state(struct ads7846 *ts)
 			default:
 				BUG();
 			}
+		} else {
+			msg_idx++;
 		}
 	}
 }