mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge 3.16-rc4 into staging-next
We want the staging tree fixes in here as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
commit
c1a567d31b
481 changed files with 4603 additions and 3071 deletions
|
|
@ -426,9 +426,12 @@ static int ad799x_write_event_value(struct iio_dev *indio_dev,
|
|||
int ret;
|
||||
struct ad799x_state *st = iio_priv(indio_dev);
|
||||
|
||||
if (val < 0 || val > RES_MASK(chan->scan_type.realbits))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&indio_dev->mlock);
|
||||
ret = ad799x_i2c_write16(st, ad799x_threshold_reg(chan, dir, info),
|
||||
val);
|
||||
val << chan->scan_type.shift);
|
||||
mutex_unlock(&indio_dev->mlock);
|
||||
|
||||
return ret;
|
||||
|
|
@ -451,7 +454,8 @@ static int ad799x_read_event_value(struct iio_dev *indio_dev,
|
|||
mutex_unlock(&indio_dev->mlock);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
*val = valin;
|
||||
*val = (valin >> chan->scan_type.shift) &
|
||||
RES_MASK(chan->scan_type.realbits);
|
||||
|
||||
return IIO_VAL_INT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ static struct iio_channel *of_iio_channel_get_by_name(struct device_node *np,
|
|||
else if (name && index >= 0) {
|
||||
pr_err("ERROR: could not get IIO channel %s:%s(%i)\n",
|
||||
np->full_name, name ? name : "", index);
|
||||
return chan;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -193,8 +193,9 @@ static struct iio_channel *of_iio_channel_get_by_name(struct device_node *np,
|
|||
*/
|
||||
np = np->parent;
|
||||
if (np && !of_get_property(np, "io-channel-ranges", NULL))
|
||||
break;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return chan;
|
||||
}
|
||||
|
||||
|
|
@ -317,6 +318,7 @@ struct iio_channel *iio_channel_get(struct device *dev,
|
|||
if (channel != NULL)
|
||||
return channel;
|
||||
}
|
||||
|
||||
return iio_channel_get_sys(name, channel_name);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(iio_channel_get);
|
||||
|
|
|
|||
Loading…
Reference in a new issue