diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-09-16 17:02:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-21 19:24:03 +0100 |
commit | 38d1c6a9116bd9642ebcb027ac66305590aa8488 (patch) | |
tree | 068330a74e5e4f649a7eced16256ffe6ff2c50ee /drivers/iio/pressure | |
parent | 9d6c39867cc6cdfb6198ec83165b72e0f14ef8b6 (diff) |
iio: sensors-core: st: Support sensors which don't have a Data Ready pin
Not all ST's sensors support data ready, so let's make the declaration
of one conditional.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/pressure')
-rw-r--r-- | drivers/iio/pressure/st_pressure_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c index 93bff9ba05d6..3abada26c3c2 100644 --- a/drivers/iio/pressure/st_pressure_core.c +++ b/drivers/iio/pressure/st_pressure_core.c @@ -254,7 +254,8 @@ int st_press_common_probe(struct iio_dev *indio_dev, pdata->odr = pdata->sensor->odr.odr_avl[0].hz; - if (!plat_data) + /* Some devices don't support a data ready pin. */ + if (!plat_data && pdata->sensor->drdy_irq.addr) plat_data = (struct st_sensors_platform_data *)&default_press_pdata; |