Skip to content

Commit

Permalink
Merge tag 'staging-4.18-rc3' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/gregkh/staging

Pull staging/IIO fixes from Greg KH:
 "Here are a few small staging and IIO driver fixes for 4.18-rc3.

  Nothing major or big, all just fixes for reported problems since
  4.18-rc1. All of these have been in linux-next this week with no
  reported problems"

* tag 'staging-4.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: android: ion: Return an ERR_PTR in ion_map_kernel
  staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write()
  iio: imu: inv_mpu6050: Fix probe() failure on older ACPI based machines
  iio: buffer: fix the function signature to match implementation
  iio: mma8452: Fix ignoring MMA8452_INT_DRDY
  iio: tsl2x7x/tsl2772: avoid potential division by zero
  iio: pressure: bmp280: fix relative humidity unit
  • Loading branch information
Linus Torvalds committed Jul 1, 2018
2 parents 652788a + ebc2dc5 commit d7563ca
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/iio/accel/mma8452.c
Original file line number Diff line number Diff line change
@@ -1053,7 +1053,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p)
if (src < 0)
return IRQ_NONE;

if (!(src & data->chip_info->enabled_events))
if (!(src & (data->chip_info->enabled_events | MMA8452_INT_DRDY)))
return IRQ_NONE;

if (src & MMA8452_INT_DRDY) {
2 changes: 2 additions & 0 deletions drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
Original file line number Diff line number Diff line change
@@ -959,6 +959,8 @@ int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name,
}

irq_type = irqd_get_trigger_type(desc);
if (!irq_type)
irq_type = IRQF_TRIGGER_RISING;
if (irq_type == IRQF_TRIGGER_RISING)
st->irq_mask = INV_MPU6050_ACTIVE_HIGH;
else if (irq_type == IRQF_TRIGGER_FALLING)
2 changes: 2 additions & 0 deletions drivers/iio/light/tsl2772.c
Original file line number Diff line number Diff line change
@@ -582,6 +582,8 @@ static int tsl2772_als_calibrate(struct iio_dev *indio_dev)
"%s: failed to get lux\n", __func__);
return lux_val;
}
if (lux_val == 0)
return -ERANGE;

ret = (chip->settings.als_cal_target * chip->settings.als_gain_trim) /
lux_val;
5 changes: 2 additions & 3 deletions drivers/iio/pressure/bmp280-core.c
Original file line number Diff line number Diff line change
@@ -415,10 +415,9 @@ static int bmp280_read_humid(struct bmp280_data *data, int *val, int *val2)
}
comp_humidity = bmp280_compensate_humidity(data, adc_humidity);

*val = comp_humidity;
*val2 = 1024;
*val = comp_humidity * 1000 / 1024;

return IIO_VAL_FRACTIONAL;
return IIO_VAL_INT;
}

static int bmp280_read_raw(struct iio_dev *indio_dev,
2 changes: 1 addition & 1 deletion drivers/staging/android/ion/ion_heap.c
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ void *ion_heap_map_kernel(struct ion_heap *heap,
struct page **tmp = pages;

if (!pages)
return NULL;
return ERR_PTR(-ENOMEM);

if (buffer->flags & ION_FLAG_CACHED)
pgprot = PAGE_KERNEL;
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/quatech_daqp_cs.c
Original file line number Diff line number Diff line change
@@ -642,7 +642,7 @@ static int daqp_ao_insn_write(struct comedi_device *dev,
/* Make sure D/A update mode is direct update */
outb(0, dev->iobase + DAQP_AUX_REG);

for (i = 0; i > insn->n; i++) {
for (i = 0; i < insn->n; i++) {
unsigned int val = data[i];
int ret;

2 changes: 1 addition & 1 deletion include/linux/iio/buffer-dma.h
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n,
char __user *user_buffer);
size_t iio_dma_buffer_data_available(struct iio_buffer *buffer);
int iio_dma_buffer_set_bytes_per_datum(struct iio_buffer *buffer, size_t bpd);
int iio_dma_buffer_set_length(struct iio_buffer *buffer, int length);
int iio_dma_buffer_set_length(struct iio_buffer *buffer, unsigned int length);
int iio_dma_buffer_request_update(struct iio_buffer *buffer);

int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue,

0 comments on commit d7563ca

Please sign in to comment.