summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTimo Alho <talho@nvidia.com>2016-10-15 16:47:36 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-10-25 14:14:45 -0400
commit78e93b7e9d4b21082bd0348288ac5a5389d2fc0f (patch)
treea15328d5a7b9cf64cbbdde8c62488e59ed148901 /drivers
parent7339774715f5e405739daa8a845104b0909b7dec (diff)
gpu: nvgpu: fix compile when CONFIG_PM=n
nvgpu driver fails to compile when CONFIG_PM build option is set to 'n'. Fix this by guarding struct gk20a_pm_ops and the functions pointed by in that struct with #ifdefs. Bug 1827482 Change-Id: I27f3535e89cc741f79824cdc427ef3572e2779e6 Signed-off-by: Timo Alho <talho@nvidia.com> Reviewed-on: http://git-master/r/1237110 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c4
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
1372static int gk20a_pm_runtime_resume(struct device *dev) 1373static 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
1470static const struct dev_pm_ops gk20a_pm_ops = { 1468static 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,