mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
spi: zynq: use to_platform_device()
Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Reviewed-by: Moritz Fischer <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
8005c49d9a
commit
9d0c1c3332
1 changed files with 2 additions and 6 deletions
|
|
@ -917,9 +917,7 @@ static int zynqmp_qspi_start_transfer(struct spi_master *master,
|
|||
*/
|
||||
static int __maybe_unused zynqmp_qspi_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);
|
||||
|
||||
spi_master_suspend(master);
|
||||
|
|
@ -940,9 +938,7 @@ static int __maybe_unused zynqmp_qspi_suspend(struct device *dev)
|
|||
*/
|
||||
static int __maybe_unused zynqmp_qspi_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 zynqmp_qspi *xqspi = spi_master_get_devdata(master);
|
||||
int ret = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue