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 13:37:45 -0700 |
commit | e53f5ac52ec19c8c606aeacdd13fed2a03d7365a (patch) | |
tree | 8463a43fb6121066350373dc9cc045afdf4c39d0 /drivers/iio/industrialio-event.c | |
parent | 7a7913f11ddf932e20d2bde72bec57f2f7a9b49e (diff) | |
download | talos-op-linux-e53f5ac52ec19c8c606aeacdd13fed2a03d7365a.tar.gz talos-op-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-event.c')
-rw-r--r-- | drivers/iio/industrialio-event.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c index 5fcf50b1ae5a..b49059de5d02 100644 --- a/drivers/iio/industrialio-event.c +++ b/drivers/iio/industrialio-event.c @@ -186,7 +186,7 @@ static ssize_t iio_ev_state_store(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_dev_attr *this_attr = to_iio_dev_attr(attr); int ret; bool val; @@ -205,7 +205,7 @@ static ssize_t iio_ev_state_show(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); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int val = indio_dev->info->read_event_config(indio_dev, this_attr->address); @@ -220,7 +220,7 @@ static ssize_t iio_ev_value_show(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); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int val, ret; @@ -237,7 +237,7 @@ static ssize_t iio_ev_value_store(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_dev_attr *this_attr = to_iio_dev_attr(attr); unsigned long val; int ret; |