Merge tag 'iio-fixes-for-3.8b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes: Second round of fixes for IIO post 3.8-rc1 Two tiny fixes * A build warning fix due to signed / unsigned comparison * Missing sign extension in adis16080
This commit is contained in:
@@ -239,7 +239,7 @@ static irqreturn_t mxs_lradc_trigger_handler(int irq, void *p)
|
||||
struct mxs_lradc *lradc = iio_priv(iio);
|
||||
const uint32_t chan_value = LRADC_CH_ACCUMULATE |
|
||||
((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET);
|
||||
int i, j = 0;
|
||||
unsigned int i, j = 0;
|
||||
|
||||
for_each_set_bit(i, iio->active_scan_mask, iio->masklength) {
|
||||
lradc->buffer[j] = readl(lradc->base + LRADC_CH(j));
|
||||
|
@@ -69,7 +69,7 @@ static int adis16080_spi_read(struct iio_dev *indio_dev,
|
||||
ret = spi_read(st->us, st->buf, 2);
|
||||
|
||||
if (ret == 0)
|
||||
*val = ((st->buf[0] & 0xF) << 8) | st->buf[1];
|
||||
*val = sign_extend32(((st->buf[0] & 0xF) << 8) | st->buf[1], 11);
|
||||
mutex_unlock(&st->buf_lock);
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user