diff options
author | Lars-Peter Clausen | 2016-02-08 11:13:29 +0100 |
---|---|---|
committer | Jonathan Cameron | 2016-02-08 19:30:51 +0100 |
commit | 2c3a52363271526544afe9040661b26543655e65 (patch) | |
tree | a8cab30febb83cea4ccbc93d3a2b1d30c98582ba /drivers/staging/iio/adc/ad7606_par.c | |
parent | iio: health: Add driver for the TI AFE4403 heart monitor (diff) | |
download | kernel-qcow2-linux-2c3a52363271526544afe9040661b26543655e65.tar.gz kernel-qcow2-linux-2c3a52363271526544afe9040661b26543655e65.tar.xz kernel-qcow2-linux-2c3a52363271526544afe9040661b26543655e65.zip |
staging:iio:ad7606: Consolidate PM ops
Both the SPI and platform device driver for the ad7606 use the same set of
PM ops. Consolidate them in the common part of the driver.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/adc/ad7606_par.c')
-rw-r--r-- | drivers/staging/iio/adc/ad7606_par.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/drivers/staging/iio/adc/ad7606_par.c b/drivers/staging/iio/adc/ad7606_par.c index adc370ee8632..84d23930fdde 100644 --- a/drivers/staging/iio/adc/ad7606_par.c +++ b/drivers/staging/iio/adc/ad7606_par.c @@ -90,36 +90,6 @@ static int ad7606_par_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int ad7606_par_suspend(struct device *dev) -{ - struct iio_dev *indio_dev = dev_get_drvdata(dev); - - ad7606_suspend(indio_dev); - - return 0; -} - -static int ad7606_par_resume(struct device *dev) -{ - struct iio_dev *indio_dev = dev_get_drvdata(dev); - - ad7606_resume(indio_dev); - - return 0; -} - -static const struct dev_pm_ops ad7606_pm_ops = { - .suspend = ad7606_par_suspend, - .resume = ad7606_par_resume, -}; - -#define AD7606_PAR_PM_OPS (&ad7606_pm_ops) - -#else -#define AD7606_PAR_PM_OPS NULL -#endif /* CONFIG_PM */ - static const struct platform_device_id ad7606_driver_ids[] = { { .name = "ad7606-8", @@ -142,7 +112,7 @@ static struct platform_driver ad7606_driver = { .id_table = ad7606_driver_ids, .driver = { .name = "ad7606", - .pm = AD7606_PAR_PM_OPS, + .pm = AD7606_PM_OPS, }, }; |