Merge tag 'iio-fixes-for-4.11a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First set of IIO fixes for the 4.11 cycle. Regression fixes from 4.10.

These are fixes that came in just to late for the 4.10 cycle.

Two drivers made an accidental assumption of structure arrangement for
struct iio_dev that are no longer true.  It was a typo in the first place
that happened to work until some elements were added to the structure.

* mpl3115
  - don't rely on structure field ordering
* mpl115
  - don't rely on structure field ordering.
This commit is contained in:
Greg Kroah-Hartman
2017-02-11 16:46:03 +01:00
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -137,6 +137,7 @@ static const struct iio_chan_spec mpl115_channels[] = {
{ {
.type = IIO_TEMP, .type = IIO_TEMP,
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
.info_mask_shared_by_type =
BIT(IIO_CHAN_INFO_OFFSET) | BIT(IIO_CHAN_INFO_SCALE), BIT(IIO_CHAN_INFO_OFFSET) | BIT(IIO_CHAN_INFO_SCALE),
}, },
}; };
+2 -2
View File
@@ -190,7 +190,7 @@ static const struct iio_chan_spec mpl3115_channels[] = {
{ {
.type = IIO_PRESSURE, .type = IIO_PRESSURE,
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
BIT(IIO_CHAN_INFO_SCALE), .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
.scan_index = 0, .scan_index = 0,
.scan_type = { .scan_type = {
.sign = 'u', .sign = 'u',
@@ -203,7 +203,7 @@ static const struct iio_chan_spec mpl3115_channels[] = {
{ {
.type = IIO_TEMP, .type = IIO_TEMP,
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
BIT(IIO_CHAN_INFO_SCALE), .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
.scan_index = 1, .scan_index = 1,
.scan_type = { .scan_type = {
.sign = 's', .sign = 's',