Commit c06d6406 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] drm timer initialisation fix

The timer is being initialised too late (in ->open()).  If modprobe fails we
get an uninitialised timer warning.
parent 0a5b59fd
......@@ -334,7 +334,6 @@ static int DRM(setup)( drm_device_t *dev )
dev->last_context = 0;
dev->last_switch = 0;
dev->last_checked = 0;
init_timer( &dev->timer );
init_waitqueue_head( &dev->context_wait );
dev->ctx_start = 0;
......@@ -590,6 +589,7 @@ static int __init drm_init( void )
dev = &(DRM(device)[i]);
memset( (void *)dev, 0, sizeof(*dev) );
dev->count_lock = SPIN_LOCK_UNLOCKED;
init_timer( &dev->timer );
sema_init( &dev->struct_sem, 1 );
if ((DRM(minor)[i] = DRM(stub_register)(DRIVER_NAME, &DRM(fops),dev)) < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment