summaryrefslogtreecommitdiff
path: root/drivers/input/misc/adxl34x-spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/misc/adxl34x-spi.c')
-rw-r--r--drivers/input/misc/adxl34x-spi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c
index ad5f40d37e48..76dc0679d3b1 100644
--- a/drivers/input/misc/adxl34x-spi.c
+++ b/drivers/input/misc/adxl34x-spi.c
@@ -89,16 +89,16 @@ static int adxl34x_spi_probe(struct spi_device *spi)
static int adxl34x_spi_remove(struct spi_device *spi)
{
- struct adxl34x *ac = dev_get_drvdata(&spi->dev);
+ struct adxl34x *ac = spi_get_drvdata(spi);
return adxl34x_remove(ac);
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int adxl34x_spi_suspend(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
- struct adxl34x *ac = dev_get_drvdata(&spi->dev);
+ struct adxl34x *ac = spi_get_drvdata(spi);
adxl34x_suspend(ac);
@@ -108,7 +108,7 @@ static int adxl34x_spi_suspend(struct device *dev)
static int adxl34x_spi_resume(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
- struct adxl34x *ac = dev_get_drvdata(&spi->dev);
+ struct adxl34x *ac = spi_get_drvdata(spi);
adxl34x_resume(ac);