Title: [9104] trunk/drivers/input/touchscreen/ad7160.c: [#6066] AD7160 Linux Driver Support: none functional changes
Revision
9104
Author
hennerich
Date
2010-08-25 18:00:31 -0400 (Wed, 25 Aug 2010)

Log Message

[#6066] AD7160 Linux Driver Support: none functional changes

Modified Paths

Diff

Modified: trunk/drivers/input/touchscreen/ad7160.c (9103 => 9104)


--- trunk/drivers/input/touchscreen/ad7160.c	2010-08-25 16:02:26 UTC (rev 9103)
+++ trunk/drivers/input/touchscreen/ad7160.c	2010-08-25 22:00:31 UTC (rev 9104)
@@ -733,11 +733,11 @@
 
 	for (i = 0; i < DIV_ROUND_UP(size, AD7160_SPLIT_SIZE); i++) {
 		offset = i * AD7160_SPLIT_SIZE;
-		data[0 + (i * AD7160_SPLIT_SIZE)] = CMD_DWNLD_DATA;		/* command */
-		data[1 + (i * AD7160_SPLIT_SIZE)] = offset >> 8;		/* offset msb */
-		data[2 + (i * AD7160_SPLIT_SIZE)] = offset & 0xFF;		/* offset lsb */
-		data[3 + (i * AD7160_SPLIT_SIZE)] = AD7160_SPLIT_SIZE >> 8;	/* buffer size msb */
-		data[4 + (i * AD7160_SPLIT_SIZE)] = AD7160_SPLIT_SIZE & 0xFF;	/* buffer size lsb */
+		data[0 + offset] = CMD_DWNLD_DATA;		/* command */
+		data[1 + offset] = offset >> 8;			/* offset msb */
+		data[2 + offset] = offset & 0xFF;		/* offset lsb */
+		data[3 + offset] = AD7160_SPLIT_SIZE >> 8;	/* buffer size msb */
+		data[4 + offset] = AD7160_SPLIT_SIZE & 0xFF;	/* buffer size lsb */
 
 		ret = ad7160_write_bytes(ts, AD7160_CMD_HDR_SIZE +
 					 AD7160_SPLIT_SIZE,
@@ -784,11 +784,8 @@
 
 	ret = ad7160_enter_boot_mode(ts);
 	if (ret < 0) {
-		if (!irq_disabled)
-			__ad7160_enable(ts);
-		mutex_unlock(&ts->mutex);
 		dev_err(dev, "failed to enter boot mode\n");
-		return ret;
+		goto out_failed;
 	}
 
 	ret = ad7160_flash_erase(ts);
@@ -804,6 +801,7 @@
 		dev_err(dev, "verify flash failed\n");
 
 	ad7160_setup(ts);
+out_failed:
 	if (!irq_disabled)
 		__ad7160_enable(ts);
 	mutex_unlock(&ts->mutex);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to