summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drm_agpsupport.c2
-rw-r--r--linux-core/drm_drv.c2
-rw-r--r--linux-core/drm_memory.h2
-rw-r--r--linux/drm_agpsupport.h2
-rw-r--r--linux/drm_drv.h2
-rw-r--r--linux/drm_memory.h2
6 files changed, 4 insertions, 8 deletions
diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c
index b070a59e..dfd0d8fc 100644
--- a/linux-core/drm_agpsupport.c
+++ b/linux-core/drm_agpsupport.c
@@ -77,7 +77,7 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp,
drm_device_t *dev = priv->dev;
int retcode;
- if (dev->agp->acquired || !drm_agp->acquire) return -EINVAL;
+ if (!dev->agp|| dev->agp->acquired || !drm_agp->acquire) return -EINVAL;
if ((retcode = drm_agp->acquire())) return retcode;
dev->agp->acquired = 1;
return 0;
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 71f52276..55d6a15d 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -480,7 +480,6 @@ static int __init drm_init( void )
DRM(takedown)( dev );
return -ENOMEM;
}
-#endif
#if __REALLY_HAVE_MTRR
dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base,
dev->agp->agp_info.aper_size*1024*1024,
@@ -488,6 +487,7 @@ static int __init drm_init( void )
1 );
#endif
#endif
+#endif
#if __HAVE_CTX_BITMAP
retcode = DRM(ctxbitmap_init)( dev );
diff --git a/linux-core/drm_memory.h b/linux-core/drm_memory.h
index caf05394..e9d3a734 100644
--- a/linux-core/drm_memory.h
+++ b/linux-core/drm_memory.h
@@ -352,7 +352,6 @@ void DRM(ioremapfree)(void *pt, unsigned long size)
}
#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE)
-#if __MUST_HAVE_AGP
agp_memory *DRM(alloc_agp)(int pages, u32 type)
{
@@ -456,5 +455,4 @@ int DRM(unbind_agp)(agp_memory *handle)
}
return retcode;
}
-#endif
#endif /* defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) */
diff --git a/linux/drm_agpsupport.h b/linux/drm_agpsupport.h
index b070a59e..dfd0d8fc 100644
--- a/linux/drm_agpsupport.h
+++ b/linux/drm_agpsupport.h
@@ -77,7 +77,7 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp,
drm_device_t *dev = priv->dev;
int retcode;
- if (dev->agp->acquired || !drm_agp->acquire) return -EINVAL;
+ if (!dev->agp|| dev->agp->acquired || !drm_agp->acquire) return -EINVAL;
if ((retcode = drm_agp->acquire())) return retcode;
dev->agp->acquired = 1;
return 0;
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 71f52276..55d6a15d 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -480,7 +480,6 @@ static int __init drm_init( void )
DRM(takedown)( dev );
return -ENOMEM;
}
-#endif
#if __REALLY_HAVE_MTRR
dev->agp->agp_mtrr = mtrr_add( dev->agp->agp_info.aper_base,
dev->agp->agp_info.aper_size*1024*1024,
@@ -488,6 +487,7 @@ static int __init drm_init( void )
1 );
#endif
#endif
+#endif
#if __HAVE_CTX_BITMAP
retcode = DRM(ctxbitmap_init)( dev );
diff --git a/linux/drm_memory.h b/linux/drm_memory.h
index caf05394..e9d3a734 100644
--- a/linux/drm_memory.h
+++ b/linux/drm_memory.h
@@ -352,7 +352,6 @@ void DRM(ioremapfree)(void *pt, unsigned long size)
}
#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE)
-#if __MUST_HAVE_AGP
agp_memory *DRM(alloc_agp)(int pages, u32 type)
{
@@ -456,5 +455,4 @@ int DRM(unbind_agp)(agp_memory *handle)
}
return retcode;
}
-#endif
#endif /* defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) */