aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_stub.c')
-rw-r--r--drivers/gpu/drm/drm_stub.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 16f3ec579b3b..327ca19cda85 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -203,7 +203,7 @@ EXPORT_SYMBOL(drm_master_put);
203int drm_setmaster_ioctl(struct drm_device *dev, void *data, 203int drm_setmaster_ioctl(struct drm_device *dev, void *data,
204 struct drm_file *file_priv) 204 struct drm_file *file_priv)
205{ 205{
206 int ret; 206 int ret = 0;
207 207
208 if (file_priv->is_master) 208 if (file_priv->is_master)
209 return 0; 209 return 0;
@@ -229,7 +229,7 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,
229 } 229 }
230 mutex_unlock(&dev->struct_mutex); 230 mutex_unlock(&dev->struct_mutex);
231 231
232 return 0; 232 return ret;
233} 233}
234 234
235int drm_dropmaster_ioctl(struct drm_device *dev, void *data, 235int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
@@ -451,14 +451,8 @@ void drm_put_dev(struct drm_device *dev)
451 451
452 drm_lastclose(dev); 452 drm_lastclose(dev);
453 453
454 if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) && 454 if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) && dev->agp)
455 dev->agp && dev->agp->agp_mtrr >= 0) { 455 arch_phys_wc_del(dev->agp->agp_mtrr);
456 int retval;
457 retval = mtrr_del(dev->agp->agp_mtrr,
458 dev->agp->agp_info.aper_base,
459 dev->agp->agp_info.aper_size * 1024 * 1024);
460 DRM_DEBUG("mtrr_del=%d\n", retval);
461 }
462 456
463 if (dev->driver->unload) 457 if (dev->driver->unload)
464 dev->driver->unload(dev); 458 dev->driver->unload(dev);