Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/etnaviv: 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: Lucas Stach <l.stach@pengutronix.de>
Cc: Russell King <linux+etnaviv@armlinux.org.uk>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: etnaviv@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Kees Cook <keescook@chromium.org>

+3 -4
+3 -4
drivers/gpu/drm/etnaviv/etnaviv_gpu.c
··· 975 975 round_jiffies_up(jiffies + DRM_ETNAVIV_HANGCHECK_JIFFIES)); 976 976 } 977 977 978 - static void hangcheck_handler(unsigned long data) 978 + static void hangcheck_handler(struct timer_list *t) 979 979 { 980 - struct etnaviv_gpu *gpu = (struct etnaviv_gpu *)data; 980 + struct etnaviv_gpu *gpu = from_timer(gpu, t, hangcheck_timer); 981 981 u32 fence = gpu->completed_fence; 982 982 bool progress = false; 983 983 ··· 1648 1648 INIT_WORK(&gpu->recover_work, recover_worker); 1649 1649 init_waitqueue_head(&gpu->fence_event); 1650 1650 1651 - setup_deferrable_timer(&gpu->hangcheck_timer, hangcheck_handler, 1652 - (unsigned long)gpu); 1651 + timer_setup(&gpu->hangcheck_timer, hangcheck_handler, TIMER_DEFERRABLE); 1653 1652 1654 1653 priv->gpu[priv->num_gpus++] = gpu; 1655 1654