diff options
| -rw-r--r-- | drivers/iio/accel/mma8452.c | 2 | ||||
| -rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 | ||||
| -rw-r--r-- | drivers/iio/light/tsl2772.c | 2 | ||||
| -rw-r--r-- | drivers/iio/pressure/bmp280-core.c | 5 | ||||
| -rw-r--r-- | drivers/staging/android/ion/ion_heap.c | 2 | ||||
| -rw-r--r-- | drivers/staging/comedi/drivers/quatech_daqp_cs.c | 2 | ||||
| -rw-r--r-- | include/linux/iio/buffer-dma.h | 2 |
7 files changed, 10 insertions, 7 deletions
diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c index 7e3d82cff3d5..c149c9c360fc 100644 --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c | |||
| @@ -1053,7 +1053,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p) | |||
| 1053 | if (src < 0) | 1053 | if (src < 0) |
| 1054 | return IRQ_NONE; | 1054 | return IRQ_NONE; |
| 1055 | 1055 | ||
| 1056 | if (!(src & data->chip_info->enabled_events)) | 1056 | if (!(src & (data->chip_info->enabled_events | MMA8452_INT_DRDY))) |
| 1057 | return IRQ_NONE; | 1057 | return IRQ_NONE; |
| 1058 | 1058 | ||
| 1059 | if (src & MMA8452_INT_DRDY) { | 1059 | if (src & MMA8452_INT_DRDY) { |
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index f9c0624505a2..42618fe4f83e 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | |||
| @@ -959,6 +959,8 @@ int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name, | |||
| 959 | } | 959 | } |
| 960 | 960 | ||
| 961 | irq_type = irqd_get_trigger_type(desc); | 961 | irq_type = irqd_get_trigger_type(desc); |
| 962 | if (!irq_type) | ||
| 963 | irq_type = IRQF_TRIGGER_RISING; | ||
| 962 | if (irq_type == IRQF_TRIGGER_RISING) | 964 | if (irq_type == IRQF_TRIGGER_RISING) |
| 963 | st->irq_mask = INV_MPU6050_ACTIVE_HIGH; | 965 | st->irq_mask = INV_MPU6050_ACTIVE_HIGH; |
| 964 | else if (irq_type == IRQF_TRIGGER_FALLING) | 966 | else if (irq_type == IRQF_TRIGGER_FALLING) |
diff --git a/drivers/iio/light/tsl2772.c b/drivers/iio/light/tsl2772.c index 34d42a2504c9..df5b2a0da96c 100644 --- a/drivers/iio/light/tsl2772.c +++ b/drivers/iio/light/tsl2772.c | |||
| @@ -582,6 +582,8 @@ static int tsl2772_als_calibrate(struct iio_dev *indio_dev) | |||
| 582 | "%s: failed to get lux\n", __func__); | 582 | "%s: failed to get lux\n", __func__); |
| 583 | return lux_val; | 583 | return lux_val; |
| 584 | } | 584 | } |
| 585 | if (lux_val == 0) | ||
| 586 | return -ERANGE; | ||
| 585 | 587 | ||
| 586 | ret = (chip->settings.als_cal_target * chip->settings.als_gain_trim) / | 588 | ret = (chip->settings.als_cal_target * chip->settings.als_gain_trim) / |
| 587 | lux_val; | 589 | lux_val; |
diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c index 5ec3e41b65f2..fe87d27779d9 100644 --- a/drivers/iio/pressure/bmp280-core.c +++ b/drivers/iio/pressure/bmp280-core.c | |||
| @@ -415,10 +415,9 @@ static int bmp280_read_humid(struct bmp280_data *data, int *val, int *val2) | |||
| 415 | } | 415 | } |
| 416 | comp_humidity = bmp280_compensate_humidity(data, adc_humidity); | 416 | comp_humidity = bmp280_compensate_humidity(data, adc_humidity); |
| 417 | 417 | ||
| 418 | *val = comp_humidity; | 418 | *val = comp_humidity * 1000 / 1024; |
| 419 | *val2 = 1024; | ||
| 420 | 419 | ||
| 421 | return IIO_VAL_FRACTIONAL; | 420 | return IIO_VAL_INT; |
| 422 | } | 421 | } |
| 423 | 422 | ||
| 424 | static int bmp280_read_raw(struct iio_dev *indio_dev, | 423 | static int bmp280_read_raw(struct iio_dev *indio_dev, |
diff --git a/drivers/staging/android/ion/ion_heap.c b/drivers/staging/android/ion/ion_heap.c index e8c440329708..31db510018a9 100644 --- a/drivers/staging/android/ion/ion_heap.c +++ b/drivers/staging/android/ion/ion_heap.c | |||
| @@ -30,7 +30,7 @@ void *ion_heap_map_kernel(struct ion_heap *heap, | |||
| 30 | struct page **tmp = pages; | 30 | struct page **tmp = pages; |
| 31 | 31 | ||
| 32 | if (!pages) | 32 | if (!pages) |
| 33 | return NULL; | 33 | return ERR_PTR(-ENOMEM); |
| 34 | 34 | ||
| 35 | if (buffer->flags & ION_FLAG_CACHED) | 35 | if (buffer->flags & ION_FLAG_CACHED) |
| 36 | pgprot = PAGE_KERNEL; | 36 | pgprot = PAGE_KERNEL; |
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index ea194aa01a64..257b0daff01f 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c | |||
| @@ -642,7 +642,7 @@ static int daqp_ao_insn_write(struct comedi_device *dev, | |||
| 642 | /* Make sure D/A update mode is direct update */ | 642 | /* Make sure D/A update mode is direct update */ |
| 643 | outb(0, dev->iobase + DAQP_AUX_REG); | 643 | outb(0, dev->iobase + DAQP_AUX_REG); |
| 644 | 644 | ||
| 645 | for (i = 0; i > insn->n; i++) { | 645 | for (i = 0; i < insn->n; i++) { |
| 646 | unsigned int val = data[i]; | 646 | unsigned int val = data[i]; |
| 647 | int ret; | 647 | int ret; |
| 648 | 648 | ||
diff --git a/include/linux/iio/buffer-dma.h b/include/linux/iio/buffer-dma.h index 767467d886de..67c75372b691 100644 --- a/include/linux/iio/buffer-dma.h +++ b/include/linux/iio/buffer-dma.h | |||
| @@ -141,7 +141,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n, | |||
| 141 | char __user *user_buffer); | 141 | char __user *user_buffer); |
| 142 | size_t iio_dma_buffer_data_available(struct iio_buffer *buffer); | 142 | size_t iio_dma_buffer_data_available(struct iio_buffer *buffer); |
| 143 | int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd); | 143 | int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd); |
| 144 | int iio_dma_buffer_set_length(struct iio_buffer *buffer, int length); | 144 | int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length); |
| 145 | int iio_dma_buffer_request_update(struct iio_buffer *buffer); | 145 | int iio_dma_buffer_request_update(struct iio_buffer *buffer); |
| 146 | 146 | ||
| 147 | int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, | 147 | int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue, |
