diff options
author | Naveen Krishna Chatradhi <ch.naveen@samsung.com> | 2013-05-20 02:34:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-05-22 17:15:20 -0400 |
commit | 927b4dc3e440a060bd7d9a7ecb83c3dcd80adc84 (patch) | |
tree | a269890f81aa5b4d50163b92804fc690ce46ccf8 /drivers/iio | |
parent | d61a04dc148db1d0e7fa2307eb0f7abbc44fcd98 (diff) |
iio: exynos_adc: fix wrong structure extration in suspend and resume
The exynos_adc device structure was wrongly extracted from the dev*
correcting the same.
Using the regular conversion of
struct device* -> struct platform_device* -> struct exynos_adc* seems wrong.
Instead we should be doing
struct device* -> struct iio_dev* -> struct exynos_adc*
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/exynos_adc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index 9f3a8ef1fb3e..b3d03d335948 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c | |||
@@ -390,8 +390,8 @@ static int exynos_adc_remove(struct platform_device *pdev) | |||
390 | #ifdef CONFIG_PM_SLEEP | 390 | #ifdef CONFIG_PM_SLEEP |
391 | static int exynos_adc_suspend(struct device *dev) | 391 | static int exynos_adc_suspend(struct device *dev) |
392 | { | 392 | { |
393 | struct platform_device *pdev = to_platform_device(dev); | 393 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
394 | struct exynos_adc *info = platform_get_drvdata(pdev); | 394 | struct exynos_adc *info = iio_priv(indio_dev); |
395 | u32 con; | 395 | u32 con; |
396 | 396 | ||
397 | if (info->version == ADC_V2) { | 397 | if (info->version == ADC_V2) { |
@@ -413,8 +413,8 @@ static int exynos_adc_suspend(struct device *dev) | |||
413 | 413 | ||
414 | static int exynos_adc_resume(struct device *dev) | 414 | static int exynos_adc_resume(struct device *dev) |
415 | { | 415 | { |
416 | struct platform_device *pdev = to_platform_device(dev); | 416 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
417 | struct exynos_adc *info = platform_get_drvdata(pdev); | 417 | struct exynos_adc *info = iio_priv(indio_dev); |
418 | int ret; | 418 | int ret; |
419 | 419 | ||
420 | ret = regulator_enable(info->vdd); | 420 | ret = regulator_enable(info->vdd); |