patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / drivers / char / drm / mga_dma.c
index bfaee0d..5e5c407 100644 (file)
@@ -500,14 +500,6 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init )
                return DRM_ERR(EINVAL);
        }
 
-       DRM_FIND_MAP( dev_priv->fb, init->fb_offset );
-       if(!dev_priv->fb) {
-               DRM_ERROR( "failed to find framebuffer!\n" );
-               /* Assign dev_private so we can do cleanup. */
-               dev->dev_private = (void *)dev_priv;
-               mga_do_cleanup_dma( dev );
-               return DRM_ERR(EINVAL);
-       }
        DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset );
        if(!dev_priv->mmio) {
                DRM_ERROR( "failed to find mmio region!\n" );
@@ -639,12 +631,12 @@ int mga_do_cleanup_dma( drm_device_t *dev )
 {
        DRM_DEBUG( "\n" );
 
-#if _HAVE_DMA_IRQ
+#if __HAVE_IRQ
        /* Make sure interrupts are disabled here because the uninstall ioctl
         * may not have been called from userspace and after dev_private
         * is freed, it's too late.
         */
-       if ( dev->irq ) DRM(irq_uninstall)(dev);
+       if ( dev->irq_enabled ) DRM(irq_uninstall)(dev);
 #endif
 
        if ( dev->dev_private ) {