diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/semaphore.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/semaphore.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/common/semaphore.c b/drivers/gpu/nvgpu/common/semaphore.c index ac45aaaa..5496f5ec 100644 --- a/drivers/gpu/nvgpu/common/semaphore.c +++ b/drivers/gpu/nvgpu/common/semaphore.c | |||
@@ -156,7 +156,7 @@ struct nvgpu_semaphore_pool *nvgpu_semaphore_pool_alloc( | |||
156 | p->sema_sea = sea; | 156 | p->sema_sea = sea; |
157 | nvgpu_init_list_node(&p->hw_semas); | 157 | nvgpu_init_list_node(&p->hw_semas); |
158 | nvgpu_init_list_node(&p->pool_list_entry); | 158 | nvgpu_init_list_node(&p->pool_list_entry); |
159 | kref_init(&p->ref); | 159 | nvgpu_ref_init(&p->ref); |
160 | 160 | ||
161 | sea->page_count++; | 161 | sea->page_count++; |
162 | nvgpu_list_add(&p->pool_list_entry, &sea->pool_list); | 162 | nvgpu_list_add(&p->pool_list_entry, &sea->pool_list); |
@@ -285,7 +285,7 @@ void nvgpu_semaphore_pool_unmap(struct nvgpu_semaphore_pool *p, | |||
285 | * Completely free a semaphore_pool. You should make sure this pool is not | 285 | * Completely free a semaphore_pool. You should make sure this pool is not |
286 | * mapped otherwise there's going to be a memory leak. | 286 | * mapped otherwise there's going to be a memory leak. |
287 | */ | 287 | */ |
288 | static void nvgpu_semaphore_pool_free(struct kref *ref) | 288 | static void nvgpu_semaphore_pool_free(struct nvgpu_ref *ref) |
289 | { | 289 | { |
290 | struct nvgpu_semaphore_pool *p = | 290 | struct nvgpu_semaphore_pool *p = |
291 | container_of(ref, struct nvgpu_semaphore_pool, ref); | 291 | container_of(ref, struct nvgpu_semaphore_pool, ref); |
@@ -314,12 +314,12 @@ static void nvgpu_semaphore_pool_free(struct kref *ref) | |||
314 | 314 | ||
315 | void nvgpu_semaphore_pool_get(struct nvgpu_semaphore_pool *p) | 315 | void nvgpu_semaphore_pool_get(struct nvgpu_semaphore_pool *p) |
316 | { | 316 | { |
317 | kref_get(&p->ref); | 317 | nvgpu_ref_get(&p->ref); |
318 | } | 318 | } |
319 | 319 | ||
320 | void nvgpu_semaphore_pool_put(struct nvgpu_semaphore_pool *p) | 320 | void nvgpu_semaphore_pool_put(struct nvgpu_semaphore_pool *p) |
321 | { | 321 | { |
322 | kref_put(&p->ref, nvgpu_semaphore_pool_free); | 322 | nvgpu_ref_put(&p->ref, nvgpu_semaphore_pool_free); |
323 | } | 323 | } |
324 | 324 | ||
325 | /* | 325 | /* |
@@ -423,7 +423,7 @@ struct nvgpu_semaphore *nvgpu_semaphore_alloc(struct channel_gk20a *ch) | |||
423 | if (!s) | 423 | if (!s) |
424 | return NULL; | 424 | return NULL; |
425 | 425 | ||
426 | kref_init(&s->ref); | 426 | nvgpu_ref_init(&s->ref); |
427 | s->hw_sema = ch->hw_sema; | 427 | s->hw_sema = ch->hw_sema; |
428 | nvgpu_atomic_set(&s->value, 0); | 428 | nvgpu_atomic_set(&s->value, 0); |
429 | 429 | ||
@@ -438,7 +438,7 @@ struct nvgpu_semaphore *nvgpu_semaphore_alloc(struct channel_gk20a *ch) | |||
438 | return s; | 438 | return s; |
439 | } | 439 | } |
440 | 440 | ||
441 | static void nvgpu_semaphore_free(struct kref *ref) | 441 | static void nvgpu_semaphore_free(struct nvgpu_ref *ref) |
442 | { | 442 | { |
443 | struct nvgpu_semaphore *s = | 443 | struct nvgpu_semaphore *s = |
444 | container_of(ref, struct nvgpu_semaphore, ref); | 444 | container_of(ref, struct nvgpu_semaphore, ref); |
@@ -450,10 +450,10 @@ static void nvgpu_semaphore_free(struct kref *ref) | |||
450 | 450 | ||
451 | void nvgpu_semaphore_put(struct nvgpu_semaphore *s) | 451 | void nvgpu_semaphore_put(struct nvgpu_semaphore *s) |
452 | { | 452 | { |
453 | kref_put(&s->ref, nvgpu_semaphore_free); | 453 | nvgpu_ref_put(&s->ref, nvgpu_semaphore_free); |
454 | } | 454 | } |
455 | 455 | ||
456 | void nvgpu_semaphore_get(struct nvgpu_semaphore *s) | 456 | void nvgpu_semaphore_get(struct nvgpu_semaphore *s) |
457 | { | 457 | { |
458 | kref_get(&s->ref); | 458 | nvgpu_ref_get(&s->ref); |
459 | } | 459 | } |