diff options
author | Paul Mackerras <paulus@samba.org> | 2007-12-09 23:41:22 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-09 23:41:22 -0500 |
commit | b242a60206881559bb3102110048762422e6b74e (patch) | |
tree | 86459efa47b9c3f69d865b4495beede9c4184003 /drivers/input/touchscreen/ads7846.c | |
parent | e1fd18656c2963e383d67b7006c0e06c9c1d9c79 (diff) | |
parent | 94545baded0bfbabdc30a3a4cb48b3db479dd6ef (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/input/touchscreen/ads7846.c')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index f59aecf5ec15..fd9c5d51870a 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -267,13 +267,12 @@ static int ads7846_read12_ser(struct device *dev, unsigned command) | |||
267 | ts->irq_disabled = 0; | 267 | ts->irq_disabled = 0; |
268 | enable_irq(spi->irq); | 268 | enable_irq(spi->irq); |
269 | 269 | ||
270 | if (req->msg.status) | 270 | if (status == 0) { |
271 | status = req->msg.status; | 271 | /* on-wire is a must-ignore bit, a BE12 value, then padding */ |
272 | 272 | sample = be16_to_cpu(req->sample); | |
273 | /* on-wire is a must-ignore bit, a BE12 value, then padding */ | 273 | sample = sample >> 3; |
274 | sample = be16_to_cpu(req->sample); | 274 | sample &= 0x0fff; |
275 | sample = sample >> 3; | 275 | } |
276 | sample &= 0x0fff; | ||
277 | 276 | ||
278 | kfree(req); | 277 | kfree(req); |
279 | return status ? status : sample; | 278 | return status ? status : sample; |