mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
iio: adc: tsc2046: fix scan interval warning
commit69b31fd7a6upstream. Sync if statement with the actual warning. Fixes:9504db5765("iio: adc: tsc2046: fix a warning message in tsc2046_adc_update_scan_mode()") Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/r/20211007093007.1466-2-o.rempel@pengutronix.de Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
24d8a24f56
commit
e4b49c3f9d
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user