diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-05-12 15:39:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-14 13:39:20 -0700 |
commit | 62c5183971428a559b687fcb15f548df28dbe8dc (patch) | |
tree | 29dd46c772887280371c28bcee1dd116fb5a6bb0 /drivers/staging/iio/adc/max1363_core.c | |
parent | ea19ed3b4f4ffde2a3e44e62905c1981d23f766e (diff) |
staging:iio:adc: 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/staging/iio/adc/max1363_core.c')
-rw-r--r-- | drivers/staging/iio/adc/max1363_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/adc/max1363_core.c b/drivers/staging/iio/adc/max1363_core.c index 572a500d6e51..6799ce23a395 100644 --- a/drivers/staging/iio/adc/max1363_core.c +++ b/drivers/staging/iio/adc/max1363_core.c @@ -499,7 +499,7 @@ static ssize_t max1363_monitor_show_freq(struct device *dev, struct device_attribute *attr, char *buf) { - struct max1363_state *st = iio_priv(dev_get_drvdata(dev)); + struct max1363_state *st = iio_priv(dev_to_iio_dev(dev)); return sprintf(buf, "%d\n", max1363_monitor_speeds[st->monitor_speed]); } @@ -508,7 +508,7 @@ static ssize_t max1363_monitor_store_freq(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 max1363_state *st = iio_priv(indio_dev); int i, ret; unsigned long val; |