diff options
author | Leif Delgass <ldelgass@users.sourceforge.net> | 2003-04-26 22:28:56 +0000 |
---|---|---|
committer | Leif Delgass <ldelgass@users.sourceforge.net> | 2003-04-26 22:28:56 +0000 |
commit | f2a0c5438dc83171de1007a68e4f98e35b5a8fbe (patch) | |
tree | f886e31d758dda4c3460465d0f6be13921efbe58 /shared-core/mga_irq.c | |
parent | a79adaab72bde726ce4c08184997f34b31014d9e (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-core/mga_irq.c')
-rw-r--r-- | shared-core/mga_irq.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/shared-core/mga_irq.c b/shared-core/mga_irq.c index 28e9a262..a2a4db53 100644 --- a/shared-core/mga_irq.c +++ b/shared-core/mga_irq.c @@ -93,8 +93,9 @@ void mga_driver_irq_postinstall( drm_device_t *dev ) { void mga_driver_irq_uninstall( drm_device_t *dev ) { drm_mga_private_t *dev_priv = (drm_mga_private_t *)dev->dev_private; - if ( dev_priv ) { - /* Disable *all* interrupts */ - MGA_WRITE( MGA_IEN, 0 ); - } + if (!dev_priv) + return; + + /* Disable *all* interrupts */ + MGA_WRITE( MGA_IEN, 0 ); } |