diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-06 15:09:01 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-07 16:48:24 -0400 |
commit | 86ecddf68734e4a938eda351f4dde11ab507de3f (patch) | |
tree | 3a8d89ace77fc3427da6243c81f224883954e8e9 /drivers/gpu/nvgpu/gp106/therm_gp106.c | |
parent | bb72b7e2ed215b26e1d9b94534c24ab4cfa52801 (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1457346
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/therm_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/therm_gp106.c | 9 |
1 files changed, 4 insertions, 5 deletions
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) | |||
32 | 32 | ||
33 | if (!(therm_temp_sensor_tsense_state_v(readval) & | 33 | if (!(therm_temp_sensor_tsense_state_v(readval) & |
34 | therm_temp_sensor_tsense_state_valid_v())) { | 34 | therm_temp_sensor_tsense_state_valid_v())) { |
35 | gk20a_err(dev_from_gk20a(g), | 35 | nvgpu_err(g, |
36 | "Attempt to read temperature while sensor is OFF!\n"); | 36 | "Attempt to read temperature while sensor is OFF!"); |
37 | err = -EINVAL; | 37 | err = -EINVAL; |
38 | } else if (therm_temp_sensor_tsense_state_v(readval) & | 38 | } else if (therm_temp_sensor_tsense_state_v(readval) & |
39 | therm_temp_sensor_tsense_state_shadow_v()) { | 39 | therm_temp_sensor_tsense_state_shadow_v()) { |
40 | gk20a_err(dev_from_gk20a(g), | 40 | nvgpu_err(g, "Reading temperature from SHADOWed sensor!"); |
41 | "Reading temperature from SHADOWed sensor!\n"); | ||
42 | } | 41 | } |
43 | 42 | ||
44 | // Convert from F9.5 -> F27.5 -> F24.8. | 43 | // Convert from F9.5 -> F27.5 -> F24.8. |
@@ -71,7 +70,7 @@ static void gp106_therm_debugfs_init(struct gk20a *g) { | |||
71 | dbgentry = debugfs_create_file( | 70 | dbgentry = debugfs_create_file( |
72 | "temp", S_IRUGO, platform->debugfs, g, &therm_ctrl_fops); | 71 | "temp", S_IRUGO, platform->debugfs, g, &therm_ctrl_fops); |
73 | if (!dbgentry) | 72 | if (!dbgentry) |
74 | gk20a_err(dev_from_gk20a(g), "debugfs entry create failed for therm_curr_temp"); | 73 | nvgpu_err(g, "debugfs entry create failed for therm_curr_temp"); |
75 | } | 74 | } |
76 | #endif | 75 | #endif |
77 | 76 | ||