summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 246338d4..b1e90bd8 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A Graphics 2 * GK20A Graphics
3 * 3 *
4 * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -1791,12 +1791,13 @@ static int gk20a_can_busy(struct gk20a *g)
1791int gk20a_busy(struct device *dev) 1791int gk20a_busy(struct device *dev)
1792{ 1792{
1793 int ret = 0; 1793 int ret = 0;
1794 struct gk20a *g = get_gk20a(dev); 1794 struct gk20a *g;
1795 struct gk20a_platform *platform; 1795 struct gk20a_platform *platform;
1796 1796
1797 if (!dev) 1797 if (!dev)
1798 return -ENODEV; 1798 return -ENODEV;
1799 1799
1800 g = get_gk20a(dev);
1800 platform = gk20a_get_platform(dev); 1801 platform = gk20a_get_platform(dev);
1801 1802
1802 if (!g || !gk20a_can_busy(g)) 1803 if (!g || !gk20a_can_busy(g))