From 86ecddf68734e4a938eda351f4dde11ab507de3f Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 6 Apr 2017 12:09:01 -0700 Subject: gpu: nvgpu: gp106: Use new error macros gk20a_err() and gk20a_warn() require a struct device pointer, which is not portable across operating systems. The new nvgpu_err() and nvgpu_warn() macros take struct gk20a pointer. Convert code to use the more portable macros. JIRA NVGPU-16 Change-Id: I18955b4c46c082883ee0bf589ab17cd66ab0add2 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1457346 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp106/therm_gp106.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106/therm_gp106.c') diff --git a/drivers/gpu/nvgpu/gp106/therm_gp106.c b/drivers/gpu/nvgpu/gp106/therm_gp106.c index c6ce6467..bf8fbfe7 100644 --- a/drivers/gpu/nvgpu/gp106/therm_gp106.c +++ b/drivers/gpu/nvgpu/gp106/therm_gp106.c @@ -32,13 +32,12 @@ static int gp106_get_internal_sensor_curr_temp(struct gk20a *g, u32 *temp_f24_8) if (!(therm_temp_sensor_tsense_state_v(readval) & therm_temp_sensor_tsense_state_valid_v())) { - gk20a_err(dev_from_gk20a(g), - "Attempt to read temperature while sensor is OFF!\n"); + nvgpu_err(g, + "Attempt to read temperature while sensor is OFF!"); err = -EINVAL; } else if (therm_temp_sensor_tsense_state_v(readval) & therm_temp_sensor_tsense_state_shadow_v()) { - gk20a_err(dev_from_gk20a(g), - "Reading temperature from SHADOWed sensor!\n"); + nvgpu_err(g, "Reading temperature from SHADOWed sensor!"); } // Convert from F9.5 -> F27.5 -> F24.8. @@ -71,7 +70,7 @@ static void gp106_therm_debugfs_init(struct gk20a *g) { dbgentry = debugfs_create_file( "temp", S_IRUGO, platform->debugfs, g, &therm_ctrl_fops); if (!dbgentry) - gk20a_err(dev_from_gk20a(g), "debugfs entry create failed for therm_curr_temp"); + nvgpu_err(g, "debugfs entry create failed for therm_curr_temp"); } #endif -- cgit v1.2.2