From 3ef352a05a027231d9cb88b63f465e6a0da89759 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Mon, 8 Sep 2014 18:17:15 +0530 Subject: gpu: nvgpu: remove gk20a_handle Remove static variable gk20a_handle used to store pointer to struct gk20a Use below device tree APIs to get pointer to platform_device and then struct gk20a device_node = of_find_matching_node() platform_device = of_find_device_by_node(device_node) Also, use two versions of do_idle()/do_unidle() APIs - one will receive void (to be used from outside GPU driver) and another will receive platform_device (to be used within GPU driver where it is available) Change-Id: I9f2c7610646c5fbcd3d99a1b03dc0364201272a8 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/496508 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom Reviewed-by: Ken Adams GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c index 687147ed..b23a1406 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c @@ -543,7 +543,7 @@ static ssize_t force_idle_store(struct device *device, if (g->forced_idle) return count; /* do nothing */ else { - err = gk20a_do_idle(); + err = __gk20a_do_idle(ndev); if (!err) { g->forced_idle = 1; dev_info(device, "gpu is idle : %d\n", @@ -554,7 +554,7 @@ static ssize_t force_idle_store(struct device *device, if (!g->forced_idle) return count; /* do nothing */ else { - err = gk20a_do_unidle(); + err = __gk20a_do_unidle(ndev); if (!err) { g->forced_idle = 0; dev_info(device, "gpu is idle : %d\n", -- cgit v1.2.2