Commit 7a246777 authored by Jingoo Han's avatar Jingoo Han Committed by Dmitry Torokhov

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent e1793c69
...@@ -89,7 +89,7 @@ static int adxl34x_spi_probe(struct spi_device *spi) ...@@ -89,7 +89,7 @@ static int adxl34x_spi_probe(struct spi_device *spi)
static int adxl34x_spi_remove(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); return adxl34x_remove(ac);
} }
...@@ -98,7 +98,7 @@ static int adxl34x_spi_remove(struct spi_device *spi) ...@@ -98,7 +98,7 @@ static int adxl34x_spi_remove(struct spi_device *spi)
static int adxl34x_spi_suspend(struct device *dev) static int adxl34x_spi_suspend(struct device *dev)
{ {
struct spi_device *spi = to_spi_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); adxl34x_suspend(ac);
...@@ -108,7 +108,7 @@ static int adxl34x_spi_suspend(struct device *dev) ...@@ -108,7 +108,7 @@ static int adxl34x_spi_suspend(struct device *dev)
static int adxl34x_spi_resume(struct device *dev) static int adxl34x_spi_resume(struct device *dev)
{ {
struct spi_device *spi = to_spi_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); adxl34x_resume(ac);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment