Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Geliang Tang and committed by
Samuel Ortiz
88e2ce01 6b52d994

+4 -4
+4 -4
drivers/nfc/trf7970a.c
··· 2139 2139 #ifdef CONFIG_PM_SLEEP 2140 2140 static 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 2143 struct trf7970a *trf = spi_get_drvdata(spi); 2144 2144 2145 2145 dev_dbg(dev, "Suspend\n"); ··· 2155 2155 2156 2156 static 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 2159 struct trf7970a *trf = spi_get_drvdata(spi); 2160 2160 int ret; 2161 2161 ··· 2174 2174 #ifdef CONFIG_PM 2175 2175 static 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 2178 struct trf7970a *trf = spi_get_drvdata(spi); 2179 2179 int ret; 2180 2180 ··· 2191 2191 2192 2192 static 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 2195 struct trf7970a *trf = spi_get_drvdata(spi); 2196 2196 int ret; 2197 2197