Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317205
b: refs/heads/master
c: 2490594
h: refs/heads/master
i:
  317203: 71ad49c
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent a3bc8f4 commit fce76f4
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 3bbbf150ffde2ca48249537d2d9e4b52bc0a5fc8
refs/heads/master: 2490594e89c7286585daeaf05a06b6cd7b5c8876
10 changes: 4 additions & 6 deletions trunk/drivers/staging/iio/dac/ad5624r_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,18 @@ static ssize_t ad5624r_write_dac_powerdown(struct iio_dev *indio_dev,
uintptr_t private, const struct iio_chan_spec *chan, const char *buf,
size_t len)
{
long readin;
bool pwr_down;
int ret;
struct ad5624r_state *st = iio_priv(indio_dev);

ret = strict_strtol(buf, 10, &readin);
ret = strtobool(buf, &pwr_down);
if (ret)
return ret;

if (readin == 1)
if (pwr_down)
st->pwr_down_mask |= (1 << chan->channel);
else if (!readin)
st->pwr_down_mask &= ~(1 << chan->channel);
else
ret = -EINVAL;
st->pwr_down_mask &= ~(1 << chan->channel);

ret = ad5624r_spi_write(st->us, AD5624R_CMD_POWERDOWN_DAC, 0,
(st->pwr_down_mode << 4) |
Expand Down

0 comments on commit fce76f4

Please sign in to comment.