aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorMarc Pignat <marc.pignat@hevs.ch>2007-12-05 02:45:11 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-05 12:21:19 -0500
commitc24b2602af88db4489c6c3fb4b2a8e47fb15769b (patch)
treed27731d5534fde61c17f3cd273ce0e639e3ff2cf /drivers/input
parent9b938b749065d6a94172ac24d9748bd66a03da4c (diff)
spi: use simplified spi_sync() calling convention
Given the patch which simplifies the spi_sync calling convention, this one updates the callers of that routine which tried using it according to the previous specification. (Most didn't.) Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/ads7846.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index f59aecf5ec1..fd9c5d51870 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;