linux/drivers/iio/common
Alban Bedel 57a01173d1 iio:st_sensors: Fix oops when probing SPI devices
commit 8e71c04f86 upstream.

In SPI mode the transfer buffer is locked with a mutex. However this
mutex is only initilized after the probe, but some transfer needs to
be done in the probe.

To fix this bug we move the mutex initialization at the beginning of
the device probe.

Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
[ luis: backported to 3.16:
  - use 'pdata' instead of 'press_data' in st_press_common_probe()
  - adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
History 2015-05-28 09:59:58 +01:00
..
hid-sensors iio: hid_sensor_hub: Fix indio_dev->trig assignment 2014-10-05 13:41:04 -07:00
st_sensors iio:st_sensors: Fix oops when probing SPI devices 2015-05-28 09:59:58 +01:00
Kconfig iio:common: Add STMicroelectronics common library 2013-01-31 17:56:43 +00:00
Makefile iio: Add a comment to about alphabetical order to Kconfigs and Makefiles 2013-08-03 18:40:36 +01:00