diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-05-12 15:39:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-14 22:37:45 +0200 |
commit | e53f5ac52ec19c8c606aeacdd13fed2a03d7365a (patch) | |
tree | 8463a43fb6121066350373dc9cc045afdf4c39d0 /drivers/iio/industrialio-trigger.c | |
parent | iio: Add dev_to_iio_dev() helper function (diff) | |
download | linux-e53f5ac52ec19c8c606aeacdd13fed2a03d7365a.tar.xz linux-e53f5ac52ec19c8c606aeacdd13fed2a03d7365a.zip |
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.c | 4 |
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; |