diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 18:16:48 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-11-22 02:46:44 +0300 |
commit | 0078730f5b829226b03194332b3405314e60c81b (patch) | |
tree | 8b9d7a09f35fa31001d070ae6ae8ab3b6ff72c29 /drivers/gpu/drm/vc4/vc4_bo.c | |
parent | bca237a52ca0035b0a0380003283d8bf590188d5 (diff) | |
download | linux-0078730f5b829226b03194332b3405314e60c81b.tar.xz |
drm/vc4: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Cc: Eric Anholt <eric@anholt.net>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20171024151648.GA104538@beast
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_bo.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_bo.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c index 98a6cb9f44fc..4ae45d7dac42 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -674,10 +674,9 @@ void vc4_bo_dec_usecnt(struct vc4_bo *bo) mutex_unlock(&bo->madv_lock); } -static void vc4_bo_cache_time_timer(unsigned long data) +static void vc4_bo_cache_time_timer(struct timer_list *t) { - struct drm_device *dev = (struct drm_device *)data; - struct vc4_dev *vc4 = to_vc4_dev(dev); + struct vc4_dev *vc4 = from_timer(vc4, t, bo_cache.time_timer); schedule_work(&vc4->bo_cache.time_work); } @@ -1039,9 +1038,7 @@ int vc4_bo_cache_init(struct drm_device *dev) INIT_LIST_HEAD(&vc4->bo_cache.time_list); INIT_WORK(&vc4->bo_cache.time_work, vc4_bo_cache_time_work); - setup_timer(&vc4->bo_cache.time_timer, - vc4_bo_cache_time_timer, - (unsigned long)dev); + timer_setup(&vc4->bo_cache.time_timer, vc4_bo_cache_time_timer, 0); return 0; } |