linux_dsm_epyc7002/drivers/iio/pressure
Linus Walleij 31f453eac5 iio: pressure: bmp280: fix runtime suspend/resume crash
In commit 3d838118c6 ("iio: pressure: bmp280: add power management")

For some reason the code in the runtime suspend/resume hooks
got wrong (I suspect in the ambition to cut down boilerplate)
and it seems it was tested without CONFIG_PM and crashes like
so for me:

Unable to handle kernel NULL pointer dereference at virtual address 0000000c
pgd = c0204000
[0000000c] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 89 Comm: kworker/1:2 Not tainted
  4.7.0-03348-g90dc3680458a-dirty #99
Hardware name: Generic DT based system
Workqueue: pm pm_runtime_work
task: df3c6300 ti: dec8a000 task.ti: dec8a000
PC is at regulator_disable+0x0/0x6c
LR is at bmp280_runtime_suspend+0x3c/0xa4

Dereferencing the BMP280 state container properly fixes the problem,
sorry for screwing up.

Fixes: 3d838118c6 ("iio: pressure: bmp280: add power management")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-15 15:46:06 +01:00
..
bmp280-core.c iio: pressure: bmp280: fix runtime suspend/resume crash 2016-08-15 15:46:06 +01:00
bmp280-i2c.c iio: pressure: bmp280: add power management 2016-07-03 11:32:14 +01:00
bmp280-regmap.c iio: pressure: bmp280: split off an I2C Kconfig entry 2016-07-03 11:27:14 +01:00
bmp280-spi.c iio: pressure: bmp280: add power management 2016-07-03 11:32:14 +01:00
bmp280.h iio: pressure: bmp280: add power management 2016-07-03 11:32:14 +01:00
hid-sensor-press.c Second set of new driver, functionality and cleanups for IIO in the 4.2 cycle. 2015-05-24 11:45:21 -07:00
hp03.c iio: pressure: hp03: Add Hope RF HP03 sensor support 2016-04-24 09:46:14 +01:00
hp206c.c iio: Export I2C module alias information 2016-05-21 20:08:14 +01:00
Kconfig iio: pressure: bmp280: add SPI interface driver 2016-07-03 11:27:15 +01:00
Makefile iio: pressure: bmp280: add SPI interface driver 2016-07-03 11:27:15 +01:00
mpl115_i2c.c iio: convert to common i2c_check_functionality() return value 2016-02-27 17:17:43 +00:00
mpl115_spi.c iio: pressure: mpl115: support MPL115A1 2016-01-30 16:27:12 +00:00
mpl115.c Merge 4.5-rc3 into staging-next 2016-02-07 17:34:04 -08:00
mpl115.h iio: pressure: mpl115: support MPL115A1 2016-01-30 16:27:12 +00:00
mpl3115.c iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
ms5611_core.c iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
ms5611_i2c.c iio:pressure:ms5611: oversampling rate support 2016-03-05 14:45:14 +00:00
ms5611_spi.c iio: pressure: ms5611: use tab for indention 2016-04-16 13:39:28 +01:00
ms5611.h iio:pressure:ms5611: fix missing regulator_disable 2016-03-20 11:02:40 +00:00
ms5637.c iio: ms5637 Add Measurement Specialties explicit MS5805 and MS5837 support 2016-06-11 17:27:52 +01:00
st_pressure_buffer.c iio: st_sensors: switch to a threaded interrupt 2016-05-29 20:21:41 +01:00
st_pressure_core.c iio:st_pressure: clean useless static channel initializers 2016-07-04 18:13:54 +01:00
st_pressure_i2c.c iio:st_pressure:initial lps22hb sensor support 2016-05-29 15:02:14 +01:00
st_pressure_spi.c iio:st_pressure:initial lps22hb sensor support 2016-05-29 15:02:14 +01:00
st_pressure.h iio:st_pressure:initial lps22hb sensor support 2016-05-29 15:02:14 +01:00
t5403.c iio: convert to common i2c_check_functionality() return value 2016-02-27 17:17:43 +00:00