diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-08 05:52:16 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-04-08 06:02:29 +0200 |
commit | 7a246777a694563c490811f9d398318652a3ffb4 (patch) | |
tree | e1553854a3b545dc9c343a719f21616f8e35abdc | |
parent | Input: ad7877 - use spi_get_drvdata() and spi_set_drvdata() (diff) | |
download | linux-7a246777a694563c490811f9d398318652a3ffb4.tar.xz linux-7a246777a694563c490811f9d398318652a3ffb4.zip |
Input: adxl34x - use spi_get_drvdata()
Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/misc/adxl34x-spi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c index 990b49e712e1..76dc0679d3b1 100644 --- a/drivers/input/misc/adxl34x-spi.c +++ b/drivers/input/misc/adxl34x-spi.c @@ -89,7 +89,7 @@ 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); } @@ -98,7 +98,7 @@ static int adxl34x_spi_remove(struct spi_device *spi) 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); |