From 6a29672f96c6bf760b159aaf19c4947883f28d4a Mon Sep 17 00:00:00 2001 From: Dipesh Gandhi Date: Tue, 18 Oct 2016 16:21:32 +0530 Subject: [PATCH] ASoC: tegra-alt: xbar child suspend fix platform_pm_suspend should not be called directly as this is not exported symbol. Changes calls the xbar child suspend function using ops exposed by child drivers. Bug 200176091 Change-Id: Idb275fe76a96e6fa8d6aec10bccb28f39e3bb0f2 Signed-off-by: Dipesh Gandhi Reviewed-on: http://git-master/r/1160288 (cherry picked from commit 508a06f86d52af5d8c6b6d9df97db6e4857773ba) Reviewed-on: http://git-master/r/1238409 GVS: Gerrit_Virtual_Submit Reviewed-by: Nitin Pai --- sound/soc/tegra-alt/tegra210_xbar_alt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/soc/tegra-alt/tegra210_xbar_alt.c b/sound/soc/tegra-alt/tegra210_xbar_alt.c index 4b741cec..879ba42b 100644 --- a/sound/soc/tegra-alt/tegra210_xbar_alt.c +++ b/sound/soc/tegra-alt/tegra210_xbar_alt.c @@ -105,7 +105,17 @@ static int tegra210_xbar_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_xbar_child_suspend(struct device *dev, void *data) { - return platform_pm_suspend(dev); + struct device_driver *drv = dev->driver; + int ret = 0; + + if (!drv) + return 0; + + if (drv->pm) + if (drv->pm->suspend) + ret = drv->pm->suspend(dev); + + return ret; } static int tegra210_xbar_suspend(struct device *dev)