summaryrefslogtreecommitdiffstats
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 6898b0c79..901350697 100644
--- a/drivers/iio/dac/cio-dac.c
+++ b/drivers/iio/dac/cio-dac.c
@@ -74,8 +74,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;