diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-10-06 16:14:38 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-11 15:58:59 (GMT) |
commit | 638e59fc8c867b44dfbe20c235df00384814cb5e (patch) | |
tree | 9358372168e9873e2a970a4acd217f013aca57c8 /drivers/staging/iio/dds | |
parent | 84f79ecb0c1f39393b96e1401d4e8a1d498f3613 (diff) | |
download | linux-fsl-qoriq-638e59fc8c867b44dfbe20c235df00384814cb5e.tar.xz |
staging:iio:dac/dds/impedance dev_info to indio_dev for consistency
We had a random missmatch of these two. Lets pick the most common
and get rid of the other.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
For adxxxx parts
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/dds')
-rw-r--r-- | drivers/staging/iio/dds/ad9832.c | 8 | ||||
-rw-r--r-- | drivers/staging/iio/dds/ad9834.c | 28 |
2 files changed, 18 insertions, 18 deletions
diff --git a/drivers/staging/iio/dds/ad9832.c b/drivers/staging/iio/dds/ad9832.c index e6cfa64..aefcab1 100644 --- a/drivers/staging/iio/dds/ad9832.c +++ b/drivers/staging/iio/dds/ad9832.c @@ -77,8 +77,8 @@ static ssize_t ad9832_write(struct device *dev, const char *buf, size_t len) { - struct iio_dev *dev_info = dev_get_drvdata(dev); - struct ad9832_state *st = iio_priv(dev_info); + struct iio_dev *indio_dev = dev_get_drvdata(dev); + struct ad9832_state *st = iio_priv(indio_dev); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int ret; long val; @@ -87,7 +87,7 @@ static ssize_t ad9832_write(struct device *dev, if (ret) goto error_ret; - mutex_lock(&dev_info->mlock); + mutex_lock(&indio_dev->mlock); switch (this_attr->address) { case AD9832_FREQ0HM: case AD9832_FREQ1HM: @@ -148,7 +148,7 @@ static ssize_t ad9832_write(struct device *dev, default: ret = -ENODEV; } - mutex_unlock(&dev_info->mlock); + mutex_unlock(&indio_dev->mlock); error_ret: return ret ? ret : len; diff --git a/drivers/staging/iio/dds/ad9834.c b/drivers/staging/iio/dds/ad9834.c index a5b5aed..fe46119 100644 --- a/drivers/staging/iio/dds/ad9834.c +++ b/drivers/staging/iio/dds/ad9834.c @@ -66,8 +66,8 @@ static ssize_t ad9834_write(struct device *dev, const char *buf, size_t len) { - struct iio_dev *dev_info = dev_get_drvdata(dev); - struct ad9834_state *st = iio_priv(dev_info); + struct iio_dev *indio_dev = dev_get_drvdata(dev); + struct ad9834_state *st = iio_priv(indio_dev); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int ret; long val; @@ -76,7 +76,7 @@ static ssize_t ad9834_write(struct device *dev, if (ret) goto error_ret; - mutex_lock(&dev_info->mlock); + mutex_lock(&indio_dev->mlock); switch (this_attr->address) { case AD9834_REG_FREQ0: case AD9834_REG_FREQ1: @@ -134,7 +134,7 @@ static ssize_t ad9834_write(struct device *dev, default: ret = -ENODEV; } - mutex_unlock(&dev_info->mlock); + mutex_unlock(&indio_dev->mlock); error_ret: return ret ? ret : len; @@ -145,13 +145,13 @@ static ssize_t ad9834_store_wavetype(struct device *dev, const char *buf, size_t len) { - struct iio_dev *dev_info = dev_get_drvdata(dev); - struct ad9834_state *st = iio_priv(dev_info); + struct iio_dev *indio_dev = dev_get_drvdata(dev); + struct ad9834_state *st = iio_priv(indio_dev); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int ret = 0; bool is_ad9833_7 = (st->devid == ID_AD9833) || (st->devid == ID_AD9837); - mutex_lock(&dev_info->mlock); + mutex_lock(&indio_dev->mlock); switch (this_attr->address) { case 0: @@ -194,7 +194,7 @@ static ssize_t ad9834_store_wavetype(struct device *dev, st->data = cpu_to_be16(AD9834_REG_CMD | st->control); ret = spi_sync(st->spi, &st->msg); } - mutex_unlock(&dev_info->mlock); + mutex_unlock(&indio_dev->mlock); return ret ? ret : len; } @@ -203,8 +203,8 @@ static ssize_t ad9834_show_out0_wavetype_available(struct device *dev, struct device_attribute *attr, char *buf) { - struct iio_dev *dev_info = dev_get_drvdata(dev); - struct ad9834_state *st = iio_priv(dev_info); + struct iio_dev *indio_dev = dev_get_drvdata(dev); + struct ad9834_state *st = iio_priv(indio_dev); char *str; if ((st->devid == ID_AD9833) || (st->devid == ID_AD9837)) @@ -225,8 +225,8 @@ static ssize_t ad9834_show_out1_wavetype_available(struct device *dev, struct device_attribute *attr, char *buf) { - struct iio_dev *dev_info = dev_get_drvdata(dev); - struct ad9834_state *st = iio_priv(dev_info); + struct iio_dev *indio_dev = dev_get_drvdata(dev); + struct ad9834_state *st = iio_priv(indio_dev); char *str; if (st->control & AD9834_MODE) @@ -285,8 +285,8 @@ static mode_t ad9834_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n) { struct device *dev = container_of(kobj, struct device, kobj); - struct iio_dev *dev_info = dev_get_drvdata(dev); - struct ad9834_state *st = iio_priv(dev_info); + struct iio_dev *indio_dev = dev_get_drvdata(dev); + struct ad9834_state *st = iio_priv(indio_dev); mode_t mode = attr->mode; |