int drm_irq_install( drm_device_t *dev ) 
static int drm_irq_install( drm_device_t *dev ) 
int drm_irq_install( drm_device_t *dev ){	int ret;	unsigned long sh_flags=0;	if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))		return -EINVAL;	if ( dev->irq == 0 )		return -EINVAL;	down( &dev->struct_sem );	/* Driver must have been initialized */	if ( !dev->dev_private ) {		up( &dev->struct_sem );		return -EINVAL;	}	if ( dev->irq_enabled ) {		up( &dev->struct_sem );		return -EBUSY;	}	dev->irq_enabled = 1;	up( &dev->struct_sem );	DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq );	if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) {		init_waitqueue_head(&dev->vbl_queue);				spin_lock_init( &dev->vbl_lock );				INIT_LIST_HEAD( &dev->vbl_sigs.head );				dev->vbl_pending = 0;	}				/* Before installing handler */	dev->driver->irq_preinstall(dev);				/* Install handler */	if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))		sh_flags = SA_SHIRQ;		ret = request_irq( dev->irq, dev->driver->irq_handler,			   sh_flags, dev->devname, dev );	if ( ret < 0 ) {		down( &dev->struct_sem );		dev->irq_enabled = 0;		up( &dev->struct_sem );		return ret;	}				/* After installing handler */	dev->driver->irq_postinstall(dev);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c94f70298529d99ac6e1ee7709f61eab00adeb39/drm_irq.c/clean/drivers/char/drm/drm_irq.c