]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/gpu/drm/vc4/vc4_bo.c
drm/vc4: Convert timers to use timer_setup()
[mirror_ubuntu-bionic-kernel.git] / drivers / gpu / drm / vc4 / vc4_bo.c
index 98a6cb9f44fc84fc8d66b8f2b6e35b72745e8363..4ae45d7dac428984fa63081338ac23f283fc5ac8 100644 (file)
@@ -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;
 }