]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/touchscreen/ads7846.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / drivers / input / touchscreen / ads7846.c
index e7c50e6e7e361ec3695f4223754dcf264b5f883f..d839f5967762ef882bcb1353c3cfaedbfb20a58b 100644 (file)
@@ -267,13 +267,12 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)
        ts->irq_disabled = 0;
        enable_irq(spi->irq);
 
-       if (req->msg.status)
-               status = req->msg.status;
-
-       /* on-wire is a must-ignore bit, a BE12 value, then padding */
-       sample = be16_to_cpu(req->sample);
-       sample = sample >> 3;
-       sample &= 0x0fff;
+       if (status == 0) {
+               /* on-wire is a must-ignore bit, a BE12 value, then padding */
+               sample = be16_to_cpu(req->sample);
+               sample = sample >> 3;
+               sample &= 0x0fff;
+       }
 
        kfree(req);
        return status ? status : sample;