aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-22 11:18:42 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2015-12-29 13:06:12 -0500
commit88e2ce014fd3472825f70050aec6e8426667ae90 (patch)
tree62e5449105b9364550793b396ebb4217a2c0ba97
parent6b52d994b2763c87d67b0968fa746824f8855783 (diff)
NFC: trf7970a: use to_spi_device
Use to_spi_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/nfc/trf7970a.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index f857feb2b573..10842b7051b3 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -2139,7 +2139,7 @@ static int trf7970a_remove(struct spi_device *spi)
2139#ifdef CONFIG_PM_SLEEP 2139#ifdef CONFIG_PM_SLEEP
2140static int trf7970a_suspend(struct device *dev) 2140static int trf7970a_suspend(struct device *dev)
2141{ 2141{
2142 struct spi_device *spi = container_of(dev, struct spi_device, dev); 2142 struct spi_device *spi = to_spi_device(dev);
2143 struct trf7970a *trf = spi_get_drvdata(spi); 2143 struct trf7970a *trf = spi_get_drvdata(spi);
2144 2144
2145 dev_dbg(dev, "Suspend\n"); 2145 dev_dbg(dev, "Suspend\n");
@@ -2155,7 +2155,7 @@ static int trf7970a_suspend(struct device *dev)
2155 2155
2156static int trf7970a_resume(struct device *dev) 2156static int trf7970a_resume(struct device *dev)
2157{ 2157{
2158 struct spi_device *spi = container_of(dev, struct spi_device, dev); 2158 struct spi_device *spi = to_spi_device(dev);
2159 struct trf7970a *trf = spi_get_drvdata(spi); 2159 struct trf7970a *trf = spi_get_drvdata(spi);
2160 int ret; 2160 int ret;
2161 2161
@@ -2174,7 +2174,7 @@ static int trf7970a_resume(struct device *dev)
2174#ifdef CONFIG_PM 2174#ifdef CONFIG_PM
2175static int trf7970a_pm_runtime_suspend(struct device *dev) 2175static int trf7970a_pm_runtime_suspend(struct device *dev)
2176{ 2176{
2177 struct spi_device *spi = container_of(dev, struct spi_device, dev); 2177 struct spi_device *spi = to_spi_device(dev);
2178 struct trf7970a *trf = spi_get_drvdata(spi); 2178 struct trf7970a *trf = spi_get_drvdata(spi);
2179 int ret; 2179 int ret;
2180 2180
@@ -2191,7 +2191,7 @@ static int trf7970a_pm_runtime_suspend(struct device *dev)
2191 2191
2192static int trf7970a_pm_runtime_resume(struct device *dev) 2192static int trf7970a_pm_runtime_resume(struct device *dev)
2193{ 2193{
2194 struct spi_device *spi = container_of(dev, struct spi_device, dev); 2194 struct spi_device *spi = to_spi_device(dev);
2195 struct trf7970a *trf = spi_get_drvdata(spi); 2195 struct trf7970a *trf = spi_get_drvdata(spi);
2196 int ret; 2196 int ret;
2197 2197