]> www.infradead.org Git - users/dwmw2/linux.git/commit
iio: st_pressure: st_accel: pass correct platform data to init
authorMichael Nosthoff <committed@heine.so>
Fri, 9 Mar 2018 09:02:45 +0000 (10:02 +0100)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:52 +0000 (21:33 -0400)
commit1b73feba1435d3899f9c0be799afbafcf4f23b96
tree27f965b5860f3dfa0b61777bf6b80d852d3b005b
parent4ff3f0cc2d8a22742f2deaccb0356da1dc0011d2
iio: st_pressure: st_accel: pass correct platform data to init

[ Upstream commit 8b438686a001db64c21782d04ef68111e53c45d9 ]

Commit 7383d44b added a pointer pdata which get set to the default
platform_data when non was defined in the device. 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.

This commit fixes this.

Cc: stable@vger.kernel.org
Fixes: 7383d44b ("iio: st_pressure: st_accel: Initialise sensor platform data properly")
Signed-off-by: Michael Nosthoff <committed@heine.so>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/iio/accel/st_accel_core.c
drivers/iio/pressure/st_pressure_core.c