Skip to content

iio: st_pressure: st_accel: Fix initialization of platform_data

Michael Nosthoff linux-iio 1 version Applied

Status from this message: Applied to the fixes-togreg branch of iio.git.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2iio: accel: Revert "iio: accel: st_accel: remove redundant pointer pdata"drivers/iio/accel/st_accel_core.c+5 -00 replies
2/2iio: st_pressure: st_accel: pass correct platform data to initdrivers/iio/accel/st_accel_core.c drivers/iio/pressure/st_pressure_core.c+2 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] iio: st_pressure: st_accel: Fix initialization of platform_data

Commit 7383d44b added a pointer pdata which gets initialized with the default platform_data when non was defined. But it did not pass this pointer to the st_sensors_init_sensor call but still used the maybe uninitialized platform_data from dev.

This breaks initialization when no platform_data is given and the optional st,drdy-int-pin devicetree option is not set.

As pdata was not used at all after this a subsequent commit removed the setting of pdata. As it is needed to fix this the first patch reverts that commit.

Michael Nosthoff (2):
iio: accel: Revert "iio: accel: st_accel: remove redundant pointer
pdata"
iio: st_pressure: st_accel: pass correct platform data to init

 drivers/iio/accel/st_accel_core.c       | 7 ++++++-
 drivers/iio/pressure/st_pressure_core.c | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4