Title: [9361] trunk/drivers/staging/iio/adc/ad799x_core.c: merge from upstream: staging: iio: adc: ad799x: Address iio list feedback
Revision
9361
Author
vapier
Date
2010-10-24 16:51:45 -0400 (Sun, 24 Oct 2010)

Log Message

merge from upstream: staging: iio: adc: ad799x: Address iio list feedback

From: Michael Hennerich <[email protected]>

Address feedback from Shubhrajyoti Datta:
	Cast return value
Michael Hennerich:
	Use i2c_smbus_read_byte_data()
	Fix return value check

Signed-off-by: Michael Hennerich <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Modified Paths

Diff

Modified: trunk/drivers/staging/iio/adc/ad799x_core.c (9360 => 9361)


--- trunk/drivers/staging/iio/adc/ad799x_core.c	2010-10-24 20:51:39 UTC (rev 9360)
+++ trunk/drivers/staging/iio/adc/ad799x_core.c	2010-10-24 20:51:45 UTC (rev 9361)
@@ -65,13 +65,13 @@
 	struct i2c_client *client = st->client;
 	int ret = 0;
 
-	ret = i2c_smbus_read_word_data(client, reg);
+	ret = i2c_smbus_read_byte_data(client, reg);
 	if (ret < 0) {
 		dev_err(&client->dev, "I2C read error\n");
 		return ret;
 	}
 
-	*data = ""
+	*data = ""
 
 	return 0;
 }
@@ -183,11 +183,10 @@
 	mask = 1 << this_attr->address;
 	/* If ring buffer capture is occuring, query the buffer */
 	if (iio_ring_enabled(dev_info)) {
-		data = "" mask);
-		if (data < 0) {
-			ret = data;
+		data = "" = ad799x_single_channel_from_ring(st, mask);
+		if (ret < 0)
 			goto error_ret;
-		}
+		ret = 0;
 	} else {
 		switch (st->id) {
 		case ad7991:
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to