Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9033a5f9 authored by Geliang Tang's avatar Geliang Tang Committed by Mark Brown
Browse files

spi: cadence: use to_platform_device()



Use to_platform_device() instead of open-coding it.

Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Reviewed-by: default avatarMoritz Fischer <moritz.fischer@ettus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8005c49d
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;