summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/common/enabled.c6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/enabled.h5
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/common/enabled.c b/drivers/gpu/nvgpu/common/enabled.c
index 00df9e3b..eaebe48c 100644
--- a/drivers/gpu/nvgpu/common/enabled.c
+++ b/drivers/gpu/nvgpu/common/enabled.c
@@ -54,11 +54,11 @@ bool nvgpu_is_enabled(struct gk20a *g, int flag)
54 return test_bit(flag, g->enabled_flags); 54 return test_bit(flag, g->enabled_flags);
55} 55}
56 56
57bool __nvgpu_set_enabled(struct gk20a *g, int flag, bool state) 57void __nvgpu_set_enabled(struct gk20a *g, int flag, bool state)
58{ 58{
59 if (state) { 59 if (state) {
60 return test_and_set_bit(flag, g->enabled_flags); 60 set_bit(flag, g->enabled_flags);
61 } else { 61 } else {
62 return test_and_clear_bit(flag, g->enabled_flags); 62 clear_bit(flag, g->enabled_flags);
63 } 63 }
64} 64}
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h
index a0b738e0..54c4d61c 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h
@@ -192,10 +192,9 @@ bool nvgpu_is_enabled(struct gk20a *g, int flag);
192 * @flag - Which flag to modify. 192 * @flag - Which flag to modify.
193 * @state - The state to set the flag to. 193 * @state - The state to set the flag to.
194 * 194 *
195 * Set the state of the passed @flag to @state. This will return the previous 195 * Set the state of the passed @flag to @state.
196 * state of the passed @flag.
197 */ 196 */
198bool __nvgpu_set_enabled(struct gk20a *g, int flag, bool state); 197void __nvgpu_set_enabled(struct gk20a *g, int flag, bool state);
199 198
200int nvgpu_init_enabled_flags(struct gk20a *g); 199int nvgpu_init_enabled_flags(struct gk20a *g);
201void nvgpu_free_enabled_flags(struct gk20a *g); 200void nvgpu_free_enabled_flags(struct gk20a *g);