From e3faedf71d881780c2b8f6548aaacfad7f0a8372 Mon Sep 17 00:00:00 2001 From: Kefeng Wang Date: Tue, 23 Apr 2019 15:50:03 +0800 Subject: iio: adc: at91: Use dev_get_drvdata() Using dev_get_drvdata directly. Cc: Ludovic Desroches Cc: Jonathan Cameron Cc: linux-iio@vger.kernel.org Signed-off-by: Kefeng Wang Signed-off-by: Jonathan Cameron --- drivers/iio/adc/at91_adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/iio/adc/at91_adc.c') diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 596841a3c4db..1aa8af3491fd 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -1360,7 +1360,7 @@ static int at91_adc_remove(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int at91_adc_suspend(struct device *dev) { - struct iio_dev *idev = platform_get_drvdata(to_platform_device(dev)); + struct iio_dev *idev = dev_get_drvdata(dev); struct at91_adc_state *st = iio_priv(idev); pinctrl_pm_select_sleep_state(dev); @@ -1371,7 +1371,7 @@ static int at91_adc_suspend(struct device *dev) static int at91_adc_resume(struct device *dev) { - struct iio_dev *idev = platform_get_drvdata(to_platform_device(dev)); + struct iio_dev *idev = dev_get_drvdata(dev); struct at91_adc_state *st = iio_priv(idev); clk_prepare_enable(st->clk); -- cgit v1.2.3