aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/cio-dac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/dac/cio-dac.c')
-rw-r--r--drivers/iio/dac/cio-dac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/dac/cio-dac.c b/drivers/iio/dac/cio-dac.c
index 81677795e57a..080a3721874d 100644
--- a/drivers/iio/dac/cio-dac.c
+++ b/drivers/iio/dac/cio-dac.c
@@ -66,8 +66,8 @@ static int cio_dac_write_raw(struct iio_dev *indio_dev,
if (mask != IIO_CHAN_INFO_RAW)
return -EINVAL;
- /* DAC can only accept up to a 16-bit value */
- if ((unsigned int)val > 65535)
+ /* DAC can only accept up to a 12-bit value */
+ if ((unsigned int)val > 4095)
return -EINVAL;
priv->chan_out_states[chan->channel] = val;