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>
struct device_attribute *attr,
char *buf)
{
- int i;
+ unsigned int i;
int offset = 0;
for (i = 0; i < ARRAY_SIZE(tsl2583_device_lux); i++) {
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);
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) {