summaryrefslogtreecommitdiff
path: root/drivers/iio/industrialio-trigger.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-05-12 15:39:33 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-14 13:37:45 -0700
commite53f5ac52ec19c8c606aeacdd13fed2a03d7365a (patch)
tree8463a43fb6121066350373dc9cc045afdf4c39d0 /drivers/iio/industrialio-trigger.c
parent7a7913f11ddf932e20d2bde72bec57f2f7a9b49e (diff)
iio: Use dev_to_iio_dev()
Replace open-coded instances of getting a iio_dev struct from a device struct with dev_to_iio_dev(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/industrialio-trigger.c')
-rw-r--r--drivers/iio/industrialio-trigger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index 1dbd7b86a694..0f582df75a19 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -310,7 +310,7 @@ static ssize_t iio_trigger_read_current(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- struct iio_dev *indio_dev = dev_get_drvdata(dev);
+ struct iio_dev *indio_dev = dev_to_iio_dev(dev);
if (indio_dev->trig)
return sprintf(buf, "%s\n", indio_dev->trig->name);
@@ -329,7 +329,7 @@ static ssize_t iio_trigger_write_current(struct device *dev,
const char *buf,
size_t len)
{
- struct iio_dev *indio_dev = dev_get_drvdata(dev);
+ struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct iio_trigger *oldtrig = indio_dev->trig;
struct iio_trigger *trig;
int ret;