Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220138
b: refs/heads/master
c: aecac19
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed Oct 6, 2010
1 parent 841bb14 commit 3dd1e29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1517c00da6d35911b6451f886d55e22d56393ad
refs/heads/master: aecac19179180b7d6cda13f598e314c0870aee80
11 changes: 5 additions & 6 deletions trunk/drivers/staging/iio/adc/ad799x_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ static int ad799x_i2c_read8(struct ad799x_state *st, u8 reg, u8 *data)
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 = ret;
*data = (u8)ret;

return 0;
}
Expand Down Expand Up @@ -182,11 +182,10 @@ static ssize_t ad799x_read_single_channel(struct device *dev,
mask = 1 << this_attr->address;
/* If ring buffer capture is occuring, query the buffer */
if (iio_ring_enabled(dev_info)) {
data = ad799x_single_channel_from_ring(st, mask);
if (data < 0) {
ret = data;
data = ret = ad799x_single_channel_from_ring(st, mask);
if (ret < 0)
goto error_ret;
}
ret = 0;
} else {
switch (st->id) {
case ad7991:
Expand Down

0 comments on commit 3dd1e29

Please sign in to comment.