summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sirf.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-08-09 15:35:16 +0800
committerMark Brown <broonie@linaro.org>2013-08-29 13:57:14 +0100
commita1216394e620d0dfbb03c712ae3210e7b77c9e11 (patch)
tree39a4deca074fea48037335d218c27f3b04123cec /drivers/spi/spi-sirf.c
parent8074cf063e410a2c0cf1704c3b31002e21f5df7c (diff)
downloadop-kernel-dev-a1216394e620d0dfbb03c712ae3210e7b77c9e11.zip
op-kernel-dev-a1216394e620d0dfbb03c712ae3210e7b77c9e11.tar.gz
spi: Use dev_get_drvdata at appropriate places
Use dev_get_drvdata() instead of platform_get_drvdata(to_platform_device(dev)). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-sirf.c')
-rw-r--r--drivers/spi/spi-sirf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index fc20bcf..fc5081a 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -599,8 +599,7 @@ static int spi_sirfsoc_remove(struct platform_device *pdev)
#ifdef CONFIG_PM
static int spi_sirfsoc_suspend(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct spi_master *master = platform_get_drvdata(pdev);
+ struct spi_master *master = dev_get_drvdata(dev);
struct sirfsoc_spi *sspi = spi_master_get_devdata(master);
clk_disable(sspi->clk);
@@ -609,8 +608,7 @@ static int spi_sirfsoc_suspend(struct device *dev)
static int spi_sirfsoc_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct spi_master *master = platform_get_drvdata(pdev);
+ struct spi_master *master = dev_get_drvdata(dev);
struct sirfsoc_spi *sspi = spi_master_get_devdata(master);
clk_enable(sspi->clk);
OpenPOWER on IntegriCloud