提交 7221819a 编写于 作者: N Nizam Haider 提交者: Jonathan Cameron

Staging: iio: frequency: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: NNizam Haider <nijamh@cdac.in>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 a260527f
...@@ -201,7 +201,7 @@ static const struct iio_info ad9832_info = { ...@@ -201,7 +201,7 @@ static const struct iio_info ad9832_info = {
static int ad9832_probe(struct spi_device *spi) static int ad9832_probe(struct spi_device *spi)
{ {
struct ad9832_platform_data *pdata = spi->dev.platform_data; struct ad9832_platform_data *pdata = dev_get_platdata(&spi->dev);
struct iio_dev *indio_dev; struct iio_dev *indio_dev;
struct ad9832_state *st; struct ad9832_state *st;
struct regulator *reg; struct regulator *reg;
......
...@@ -318,7 +318,7 @@ static const struct iio_info ad9833_info = { ...@@ -318,7 +318,7 @@ static const struct iio_info ad9833_info = {
static int ad9834_probe(struct spi_device *spi) static int ad9834_probe(struct spi_device *spi)
{ {
struct ad9834_platform_data *pdata = spi->dev.platform_data; struct ad9834_platform_data *pdata = dev_get_platdata(&spi->dev);
struct ad9834_state *st; struct ad9834_state *st;
struct iio_dev *indio_dev; struct iio_dev *indio_dev;
struct regulator *reg; struct regulator *reg;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册