linux/drivers/iio/magnetometer
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
..
ak8975.c First set of IIO fixes for the 3.16 cycle. 2014-06-18 10:41:08 -07:00
hid-sensor-magn-3d.c iio: hid-sensor-magn-3d: Fix return values 2014-07-05 11:07:12 +01:00
Kconfig iio: ak8975 : Add AK8963 compatibility mode support 2014-03-22 12:41:37 +00:00
mag3110.c iio:magnetometer:mag3110: Enable user offset calibration 2014-05-03 11:27:52 +01:00
Makefile iio: Add Freescale mag3110 magnetometer driver 2013-10-23 17:43:11 +01:00
st_magn.h iio: Added ST-sensors platform data to select the DRDY interrupt pin 2013-08-03 18:40:28 +01:00
st_magn_buffer.c iio:st_magn: Remove redundant call to iio_sw_buffer_preenable(). 2013-10-16 19:13:50 +01:00
st_magn_core.c iio:st_sensors: Fix oops when probing SPI devices 2015-05-28 09:59:58 +01:00
st_magn_i2c.c iio: magnetometer: st_magn: Use devm_iio_device_alloc 2013-08-03 18:43:14 +01:00
st_magn_spi.c iio: magnetometer: st_magn: Use devm_iio_device_alloc 2013-08-03 18:43:14 +01:00