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.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAlie07IRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0Fohcpg//XXnNnUq4K90bM7krxcM0+0iQze5ZJOUJ
 BqXV8IfFicbeeo0a463g0wcYAJ1kmzNJV3eqMhCUC7seYoqQ6ji1FCPN0qw/TSv1
 Mc9pE15i3GJ3vjsWKWMr0Bc0Gg+Ccah0aO/P3eatuwtvakZfPeUpvZakWBdkr1mP
 97OlBm0BdOBF8tXJ9KAEe3rB/pJDLc2JNpIIlRi8hitw+GRpnhdZzLpwbZKG6Ytf
 ozT3IUC7LpnolCfpnzvCkSpHZnAr22MVPXkHLK7a4Vb/C3mTjJVsKjTdXN60luh3
 C0hcN3IWyb/KAwLPSK9dqbkQBvoDSOtG8EGBeZoXdc1lHtia90Qp3hTeINDwRvPl
 un37OUYdEOtZ4JPG7FGHvgdc8bhkUJv2ZHITZWaIdZJAVj8DOWfQcydtxjHP/t8k
 mtgcg+OMCkgihN97kLqYS1dJnZIy3PwxoooDOJ0KB8/S8N3SbaWOFfuGWYaQikVL
 IIRA7CyWI3yEjioqfWc/ujXUgjhFNc7XC9M44huEg+ysExW5OamsoVtbEoqCOVIm
 s7NwoyRbjaDHzaLiulX/eCzb1C02PV0wof3NrPMv4T3Ao4L4cG34Pe5zOcKAPWr4
 WefoZATobg6AmMEuK4CYtP3l0mInVw7vSGPfW9+D+3PppA8QRLCWgFbO0CENnMVM
 K4oBg9E7Sd0=
 =DW22
 -----END PGP SIGNATURE-----

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
commit b96dea60bc
2 changed files with 3 additions and 2 deletions

View file

@ -137,6 +137,7 @@ static const struct iio_chan_spec mpl115_channels[] = {
{
.type = IIO_TEMP,
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
.info_mask_shared_by_type =
BIT(IIO_CHAN_INFO_OFFSET) | BIT(IIO_CHAN_INFO_SCALE),
},
};

View file

@ -190,7 +190,7 @@ static const struct iio_chan_spec mpl3115_channels[] = {
{
.type = IIO_PRESSURE,
.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_type = {
.sign = 'u',
@ -203,7 +203,7 @@ static const struct iio_chan_spec mpl3115_channels[] = {
{
.type = IIO_TEMP,
.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_type = {
.sign = 's',