diff options
author | Brian Masney <masneyb@onstation.org> | 2016-11-12 13:19:25 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-11-13 13:07:23 +0000 |
commit | 6d94de6aaf1b7a0a2a149769ffc4ec3d67046049 (patch) | |
tree | 0a4ae2f4056790c4fb34dd11496738d0a7be8458 /drivers/staging/iio | |
parent | 8391c882ac8e1ba8d14e658b5a7f8bc9ab467f09 (diff) | |
download | linux-6d94de6aaf1b7a0a2a149769ffc4ec3d67046049.tar.bz2 |
staging: iio: tsl2583: fix comparison between signed and unsigned integers
Fixed warning found by make W=2:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/light/tsl2583.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c index 7e4347a1235e..3e4e2151572a 100644 --- a/drivers/staging/iio/light/tsl2583.c +++ b/drivers/staging/iio/light/tsl2583.c @@ -510,7 +510,7 @@ static ssize_t in_illuminance_lux_table_show(struct device *dev, struct device_attribute *attr, char *buf) { - int i; + unsigned int i; int offset = 0; for (i = 0; i < ARRAY_SIZE(tsl2583_device_lux); i++) { @@ -541,7 +541,8 @@ static ssize_t in_illuminance_lux_table_store(struct device *dev, struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct tsl2583_chip *chip = iio_priv(indio_dev); int value[ARRAY_SIZE(tsl2583_device_lux) * 3 + 1]; - int n, ret = -EINVAL; + int ret = -EINVAL; + unsigned int n; mutex_lock(&chip->als_mutex); @@ -719,7 +720,7 @@ static int tsl2583_write_raw(struct iio_dev *indio_dev, break; case IIO_CHAN_INFO_CALIBSCALE: if (chan->type == IIO_LIGHT) { - int i; + unsigned int i; for (i = 0; i < ARRAY_SIZE(gainadj); i++) { if (gainadj[i].mean == val) { |