diff options
author | David S. Miller <davem@davemloft.net> | 2016-01-15 18:36:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-15 18:36:23 -0500 |
commit | 7a26019fdecdb45ff784ae4e3b7e0cc9045100ca (patch) | |
tree | 511474baafa5b5c0b072e88feaa6bb405724b34f /drivers/spi/spi-cadence.c | |
parent | 725da8dee445662beea77d3f42c3f4c79f7a7a0e (diff) | |
parent | 4e5448a31d73d0e944b7adb9049438a09bc332cb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/spi/spi-cadence.c')
-rw-r--r-- | drivers/spi/spi-cadence.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c index 5a6749881ff9..121a4135b540 100644 --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c @@ -617,8 +617,7 @@ static int cdns_spi_remove(struct platform_device *pdev) */ static int __maybe_unused cdns_spi_suspend(struct device *dev) { - struct platform_device *pdev = container_of(dev, - struct platform_device, dev); + struct platform_device *pdev = to_platform_device(dev); struct spi_master *master = platform_get_drvdata(pdev); struct cdns_spi *xspi = spi_master_get_devdata(master); @@ -641,8 +640,7 @@ static int __maybe_unused cdns_spi_suspend(struct device *dev) */ static int __maybe_unused cdns_spi_resume(struct device *dev) { - struct platform_device *pdev = container_of(dev, - struct platform_device, dev); + struct platform_device *pdev = to_platform_device(dev); struct spi_master *master = platform_get_drvdata(pdev); struct cdns_spi *xspi = spi_master_get_devdata(master); int ret = 0; |