diff --git a/drivers/staging/iio/frequency/ad5930.c b/drivers/staging/iio/frequency/ad5930.c index 97542fc9bf222241a4229c3a3b3b1bc3139b217f..2d541d0eebef8c3b31f46d7d37121febaca9ca45 100644 --- a/drivers/staging/iio/frequency/ad5930.c +++ b/drivers/staging/iio/frequency/ad5930.c @@ -48,7 +48,7 @@ static ssize_t ad5930_set_parameter(struct device *dev, struct spi_transfer xfer; int ret; struct ad5903_config *config = (struct ad5903_config *)buf; - struct iio_dev *idev = dev_get_drvdata(dev); + struct iio_dev *idev = dev_to_iio_dev(dev); struct ad5930_state *st = iio_priv(idev); config->control = (config->control & ~value_mask); diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c index 2f9abac7c41c9f41183b28a82f9109f4ef373184..fed39404e34a19d4fa153043734b8aba8df4f859 100644 --- a/drivers/staging/iio/frequency/ad9832.c +++ b/drivers/staging/iio/frequency/ad9832.c @@ -77,7 +77,7 @@ static ssize_t ad9832_write(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 ad9832_state *st = iio_priv(indio_dev); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int ret; diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c index f4b581f20b42eba3b47d6931bc132c7c2a19af72..1b2dc741d2ce7689a16f93cdb7e5ce02dacd9ca4 100644 --- a/drivers/staging/iio/frequency/ad9834.c +++ b/drivers/staging/iio/frequency/ad9834.c @@ -66,7 +66,7 @@ static ssize_t ad9834_write(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 ad9834_state *st = iio_priv(indio_dev); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int ret; @@ -145,7 +145,7 @@ static ssize_t ad9834_store_wavetype(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 ad9834_state *st = iio_priv(indio_dev); struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); int ret = 0; @@ -203,7 +203,7 @@ static ssize_t ad9834_show_out0_wavetype_available(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 ad9834_state *st = iio_priv(indio_dev); char *str; @@ -225,7 +225,7 @@ static ssize_t ad9834_show_out1_wavetype_available(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 ad9834_state *st = iio_priv(indio_dev); char *str; diff --git a/drivers/staging/iio/frequency/ad9850.c b/drivers/staging/iio/frequency/ad9850.c index 39f12a6a08b474b469a1aa1b40c45c3981791319..74abee054ac02b5c9c26950256e0fed72e4ab7df 100644 --- a/drivers/staging/iio/frequency/ad9850.c +++ b/drivers/staging/iio/frequency/ad9850.c @@ -43,7 +43,7 @@ static ssize_t ad9850_set_parameter(struct device *dev, struct spi_transfer xfer; int ret; struct ad9850_config *config = (struct ad9850_config *)buf; - struct iio_dev *idev = dev_get_drvdata(dev); + struct iio_dev *idev = dev_to_iio_dev(dev); struct ad9850_state *st = iio_priv(idev); xfer.len = len; diff --git a/drivers/staging/iio/frequency/ad9852.c b/drivers/staging/iio/frequency/ad9852.c index 58d4bf89e64e05b1cbabe97e0a22fb5e641c97eb..fd9d14a413a550f8c7df3949133e90829acb1ec7 100644 --- a/drivers/staging/iio/frequency/ad9852.c +++ b/drivers/staging/iio/frequency/ad9852.c @@ -71,7 +71,7 @@ static ssize_t ad9852_set_parameter(struct device *dev, struct spi_transfer xfer; int ret; struct ad9852_config *config = (struct ad9852_config *)buf; - struct iio_dev *idev = dev_get_drvdata(dev); + struct iio_dev *idev = dev_to_iio_dev(dev); struct ad9852_state *st = iio_priv(idev); xfer.len = 3; diff --git a/drivers/staging/iio/frequency/ad9910.c b/drivers/staging/iio/frequency/ad9910.c index 6e7a97e92a20eb3a84c0ca3ff81a276c9a98081c..5a7ba305b75a3986df942651815a24e95eb3f0ab 100644 --- a/drivers/staging/iio/frequency/ad9910.c +++ b/drivers/staging/iio/frequency/ad9910.c @@ -123,7 +123,7 @@ static ssize_t ad9910_set_parameter(struct device *dev, struct spi_transfer xfer; int ret; struct ad9910_config *config = (struct ad9910_config *)buf; - struct iio_dev *idev = dev_get_drvdata(dev); + struct iio_dev *idev = dev_to_iio_dev(dev); struct ad9910_state *st = iio_priv(idev); xfer.len = 5; diff --git a/drivers/staging/iio/frequency/ad9951.c b/drivers/staging/iio/frequency/ad9951.c index 19ba721788fe2344c0a2eea5edba84f988284319..ba6f49ff09aef35b1e7b3e71ca5caa6bff858824 100644 --- a/drivers/staging/iio/frequency/ad9951.c +++ b/drivers/staging/iio/frequency/ad9951.c @@ -64,7 +64,7 @@ static ssize_t ad9951_set_parameter(struct device *dev, struct spi_transfer xfer; int ret; struct ad9951_config *config = (struct ad9951_config *)buf; - struct iio_dev *idev = dev_get_drvdata(dev); + struct iio_dev *idev = dev_to_iio_dev(dev); struct ad9951_state *st = iio_priv(idev); xfer.len = 3;