diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-05-12 13:39:33 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-14 20:37:45 (GMT) |
commit | e53f5ac52ec19c8c606aeacdd13fed2a03d7365a (patch) | |
tree | 8463a43fb6121066350373dc9cc045afdf4c39d0 /drivers/iio/industrialio-trigger.c | |
parent | 7a7913f11ddf932e20d2bde72bec57f2f7a9b49e (diff) | |
download | linux-e53f5ac52ec19c8c606aeacdd13fed2a03d7365a.tar.xz |
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 1dbd7b8..0f582df 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; |