summaryrefslogtreecommitdiff
path: root/drivers/iio/common/st_sensors
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-04-30 15:15:46 +0200
committerJonathan Cameron <jic23@kernel.org>2015-05-07 10:42:32 +0100
commit3337c9ff17948e1879fb06ea722baa9519533e0f (patch)
tree548c72187dcbe0bcf53d2181414512aea0b9e9b2 /drivers/iio/common/st_sensors
parente693e15e869fb314c86770c1f1451fdd013654c0 (diff)
downloadlwn-3337c9ff17948e1879fb06ea722baa9519533e0f.tar.gz
lwn-3337c9ff17948e1879fb06ea722baa9519533e0f.zip
iio: st_sensors: print error when failing to get IRQ
Print a proper error message if we're missing the trigger IRQ. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/common/st_sensors')
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_trigger.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c b/drivers/iio/common/st_sensors/st_sensors_trigger.c
index 8d8ca6f1e16a..3e907040c2c7 100644
--- a/drivers/iio/common/st_sensors/st_sensors_trigger.c
+++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c
@@ -37,8 +37,10 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
IRQF_TRIGGER_RISING,
sdata->trig->name,
sdata->trig);
- if (err)
+ if (err) {
+ dev_err(&indio_dev->dev, "failed to request trigger IRQ.\n");
goto request_irq_error;
+ }
iio_trigger_set_drvdata(sdata->trig, indio_dev);
sdata->trig->ops = trigger_ops;