summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJohnny Qiu <joqiu@nvidia.com>2012-06-18 15:11:23 +0800
committerSimone Willett <swillett@nvidia.com>2012-06-20 13:40:53 -0700
commitb426ea53fbdd902e85eacb865d1b2912b49260fe (patch)
treec7d26c72bb9c68337f9d10c90d93b515a7b5dc19 /drivers
parent03b3d64a3fef9419e1b6eec35ff9add0785dd045 (diff)
spi: tegra: do not start transfer if runtime pm fails to resume
Bug 995706 During device shutdown/rebooting, runtime PM is disabled. SPI bus driver will fail to call tegra_spi_runtime_resume() to resume the clock needed by tranferring. In this case, do not start transferring. Change-Id: I42cc0763f55b6c90df00fbad68794939e903199a Signed-off-by: Johnny Qiu <joqiu@nvidia.com> Reviewed-on: http://git-master/r/109458 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-tegra.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/spi/spi-tegra.c b/drivers/spi/spi-tegra.c
index d4b9c3344eee..33e2004101b7 100644
--- a/drivers/spi/spi-tegra.c
+++ b/drivers/spi/spi-tegra.c
@@ -736,7 +736,12 @@ static void spi_tegra_start_transfer(struct spi_device *spi,
command2 = tspi->def_command2_reg;
if (is_first_of_msg) {
- pm_runtime_get_sync(&tspi->pdev->dev);
+ if ((ret = pm_runtime_get_sync(&tspi->pdev->dev)) < 0) {
+ dev_err(&tspi->pdev->dev,
+ "%s: pm_runtime_get_sync() returns %d\n",
+ __func__, ret);
+ return;
+ }
spi_tegra_clear_status(tspi);