Skip to content

Commit

Permalink
iio: adc: tsc2046: fix scan interval warning
Browse files Browse the repository at this point in the history
Sync if statement with the actual warning.

Fixes: 9504db5 ("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>
  • Loading branch information
Oleksij Rempel authored and Jonathan Cameron committed Oct 17, 2021
1 parent 19833c4 commit 69b31fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/adc/ti-tsc2046.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 69b31fd

Please sign in to comment.