summaryrefslogtreecommitdiff
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-24 14:08:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-24 14:08:36 +0300
commit8210a2004d446ca49a782ba824ca2fbb9667ce9e (patch)
tree1badf913b1eb064141fd2c3cfaec41b62c02238c /drivers/iio/adc
parent714f1af14bb0c829a33ad68c4ef7d622618ce702 (diff)
parent486a25084155bf633768c26f022201c051d6fd95 (diff)
downloadlinux-8210a2004d446ca49a782ba824ca2fbb9667ce9e.tar.xz
Merge tag 'iio-fixes-for-5.16a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes: First set of IIO fixes for the 5.16 cycle As these are very late in the 5.15 cycle and non are particularly urgent, they can wait for the merge window. Key element in this set is Yang Yingliang has identified a number of issues in error paths introduced recently when we added multiple buffer support. Other fixes: * adi,ad5662 - Fix handling of i2c_master_send() return value. * adi,ad5766 - Fix a wrong dt-property name that indicated wrong units and did not mach the bindings. - Associated 'fix' of the bindings example to have a possible scale. * st,pressure-spi - Add some missing entries to the spi_device_id table to ensure auto-loading works. * ti,tsc2046 - Fix a backwards comparison leading to a false dev_warn * tag 'iio-fixes-for-5.16a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: buffer: Fix memory leak in iio_buffers_alloc_sysfs_and_mask() iio: adc: tsc2046: fix scan interval warning iio: core: fix double free in iio_device_unregister_sysfs() iio: core: check return value when calling dev_set_name() iio: buffer: Fix memory leak in iio_buffer_register_legacy_sysfs_groups() iio: buffer: Fix double-free in iio_buffers_alloc_sysfs_and_mask() iio: buffer: Fix memory leak in __iio_buffer_alloc_sysfs_and_mask() iio: buffer: check return value of kstrdup_const() iio: dac: ad5446: Fix ad5622_write() return value Documentation:devicetree:bindings:iio:dac: Fix val drivers: iio: dac: ad5766: Fix dt property name iio: st_pressure_spi: Add missing entries SPI to device ID table
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/ti-tsc2046.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ti-tsc2046.c b/drivers/iio/adc/ti-tsc2046.c
index 170950d5dd49..d84ae6b008c1 100644
--- a/drivers/iio/adc/ti-tsc2046.c
+++ b/drivers/iio/adc/ti-tsc2046.c
@@ -398,7 +398,7 @@ static int tsc2046_adc_update_scan_mode(struct iio_dev *indio_dev,
priv->xfer.len = size;
priv->time_per_scan_us = size * 8 * priv->time_per_bit_ns / NSEC_PER_USEC;
- if (priv->scan_interval_us > priv->time_per_scan_us)
+ if (priv->scan_interval_us < priv->time_per_scan_us)
dev_warn(&priv->spi->dev, "The scan interval (%d) is less then calculated scan time (%d)\n",
priv->scan_interval_us, priv->time_per_scan_us);