summaryrefslogtreecommitdiff
path: root/shared/radeon_irq.c
diff options
context:
space:
mode:
authorLeif Delgass <ldelgass@users.sourceforge.net>2003-04-26 22:28:56 +0000
committerLeif Delgass <ldelgass@users.sourceforge.net>2003-04-26 22:28:56 +0000
commitf2a0c5438dc83171de1007a68e4f98e35b5a8fbe (patch)
treef886e31d758dda4c3460465d0f6be13921efbe58 /shared/radeon_irq.c
parenta79adaab72bde726ce4c08184997f34b31014d9e (diff)
Ensure driver has been initialized (dev_private != NULL) before installing
irq handler in DRM(irq_install). Modify all drivers to ensure irq handler is removed before cleanup and cleanup is called at takedown. Remove unused buffer private struct fields in i810, i830. Check for lock on init/cleanup in all drivers except i810/i830. The current DDX for i810 and i830 doesn't hold the lock on kernel init (FIXME?).
Diffstat (limited to 'shared/radeon_irq.c')
-rw-r--r--shared/radeon_irq.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/shared/radeon_irq.c b/shared/radeon_irq.c
index 9199fbbf..c6bd90e5 100644
--- a/shared/radeon_irq.c
+++ b/shared/radeon_irq.c
@@ -249,8 +249,9 @@ void DRM(driver_irq_postinstall)( drm_device_t *dev ) {
void DRM(driver_irq_uninstall)( drm_device_t *dev ) {
drm_radeon_private_t *dev_priv =
(drm_radeon_private_t *)dev->dev_private;
- if ( dev_priv ) {
- /* Disable *all* interrupts */
- RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 );
- }
+ if (!dev_priv)
+ return;
+
+ /* Disable *all* interrupts */
+ RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 );
}