diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 55ebf2da..70eb0a7e 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1369,6 +1369,7 @@ static void gk20a_pm_shutdown(struct platform_device *pdev) | |||
1369 | dev_info(&pdev->dev, "shut down complete\n"); | 1369 | dev_info(&pdev->dev, "shut down complete\n"); |
1370 | } | 1370 | } |
1371 | 1371 | ||
1372 | #ifdef CONFIG_PM | ||
1372 | static int gk20a_pm_runtime_resume(struct device *dev) | 1373 | static int gk20a_pm_runtime_resume(struct device *dev) |
1373 | { | 1374 | { |
1374 | int err = 0; | 1375 | int err = 0; |
@@ -1419,12 +1420,10 @@ static int gk20a_pm_suspend(struct device *dev) | |||
1419 | if (platform->user_railgate_disabled) | 1420 | if (platform->user_railgate_disabled) |
1420 | gk20a_idle_nosuspend(dev); | 1421 | gk20a_idle_nosuspend(dev); |
1421 | 1422 | ||
1422 | #ifdef CONFIG_PM | ||
1423 | if (atomic_read(&dev->power.usage_count) > 1) { | 1423 | if (atomic_read(&dev->power.usage_count) > 1) { |
1424 | ret = -EBUSY; | 1424 | ret = -EBUSY; |
1425 | goto fail; | 1425 | goto fail; |
1426 | } | 1426 | } |
1427 | #endif | ||
1428 | 1427 | ||
1429 | if (!g->power_on) | 1428 | if (!g->power_on) |
1430 | return 0; | 1429 | return 0; |
@@ -1466,7 +1465,6 @@ static int gk20a_pm_resume(struct device *dev) | |||
1466 | return ret; | 1465 | return ret; |
1467 | } | 1466 | } |
1468 | 1467 | ||
1469 | #ifdef CONFIG_PM | ||
1470 | static const struct dev_pm_ops gk20a_pm_ops = { | 1468 | static const struct dev_pm_ops gk20a_pm_ops = { |
1471 | .runtime_resume = gk20a_pm_runtime_resume, | 1469 | .runtime_resume = gk20a_pm_runtime_resume, |
1472 | .runtime_suspend = gk20a_pm_runtime_suspend, | 1470 | .runtime_suspend = gk20a_pm_runtime_suspend, |