linux/drivers/iio
Jonathan Cameron e765537add Revert "iio:humidity:si7020: fix pointer to i2c client"
This reverts commit e0922e5e3c.
Requested by Andrey Smirnov.

It incorrectly assumes that the level of indirection is not needed
which is not true(probably because the driver incorrectly allocates
sizeof(*client) instead of sizeof(*data) via devm_iio_device_alloc).
If you look at the code of the probe function(see below) it is easy to
see that what is being stored in the private memory of the IIO device
instance is not a copy of a 'struct i2c_client' but a pointer to an
instance passed as an argument to the probe function.

struct i2c_client **data;
int ret;

< Some code skipped >

indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*client));
if (!indio_dev)
return -ENOMEM;

data = iio_priv(indio_dev);
*data = client;

Without reverting this change any read of a raw value of this sensor
leads to a kernel oops due to a NULL pointer de-reference on my
hardware setup.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Stable@vger.kernel.org
2015-02-14 11:32:17 +00:00
..
accel Staging patches for 3.19-rc1 2014-12-15 18:06:13 -08:00
adc iio:adc:mcp3422 Fix incorrect scales table 2015-02-04 16:30:22 +00:00
amplifiers
common First round of new drivers, features and cleanups for IIO in the 3.19 cycle. 2014-11-05 11:42:48 -08:00
dac iio: ad5686: fix optional reference voltage declaration 2015-02-04 16:54:38 +00:00
frequency
gyro Staging patches for 3.19-rc1 2014-12-15 18:06:13 -08:00
humidity Revert "iio:humidity:si7020: fix pointer to i2c client" 2015-02-14 11:32:17 +00:00
imu iio: imu: adis16400: Fix sign extension 2015-01-26 21:06:42 +00:00
light iio: light: gp2ap020a00f: Select REGMAP_I2C 2015-02-14 11:28:48 +00:00
magnetometer First round of new drivers, features and cleanups for IIO in the 3.19 cycle. 2014-11-05 11:42:48 -08:00
orientation iio: remove .owner field for driver using module_platform_driver 2014-08-26 21:08:38 +01:00
pressure iio:pressure:bmp280: fix pressure calculation 2014-11-05 15:58:35 +00:00
proximity Merge 3.18-rc4 into staging-next 2014-11-10 12:24:26 +09:00
temperature iio: Add Melexis mlx90614 contact-less infrared temperature sensor driver 2014-05-03 11:38:13 +01:00
trigger iio: remove .owner field for driver using module_platform_driver 2014-08-26 21:08:38 +01:00
buffer_cb.c iio get rid of unneccessary error_ret 2014-02-18 08:46:36 +00:00
iio_core_trigger.h
iio_core.h IIO: core: Introduce read_raw_multi 2014-04-29 22:05:32 +01:00
industrialio-buffer.c 1st round of new IIO drivers, functionality and cleanups for the 3.18 cycle. 2014-08-25 11:09:35 -07:00
industrialio-core.c iio: types: Added support for rotation from north usage attributes 2014-07-20 13:34:45 +01:00
industrialio-event.c Staging driver patches for 3.17-rc1 2014-08-04 18:36:12 -07:00
industrialio-trigger.c iio: Remove timestamp argument from iio_trigger_poll() and iio_trigger_poll_chained() 2014-06-14 16:25:59 +01:00
industrialio-triggered-buffer.c
inkern.c First round of IIO fixes for the 3.19 cycle. 2015-01-08 17:59:04 -08:00
Kconfig iio: always select ANON_INODES 2014-05-10 11:39:57 +01:00
kfifo_buf.c
Makefile iio: Add AS3935 lightning sensor support 2014-03-16 18:00:32 +00:00