diff options
author | Dave Airlie <airlied@linux.ie> | 2007-11-15 16:51:48 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-11-15 16:51:48 +1100 |
commit | 7136f55faaf3afefe522ec978a4cbc906dace861 (patch) | |
tree | c0543fa169389d9ca78a9b6a450ef4276015b219 | |
parent | 12cbe1365b38ae04ad4979123eb5b4e9538ee533 (diff) |
drm: don't remove mappings added by the driver
-rw-r--r-- | linux-core/drm_drv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 8313b3ea..99eba979 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -250,8 +250,10 @@ int drm_lastclose(struct drm_device * dev) } list_for_each_entry_safe(r_list, list_t, &dev->maplist, head) { - drm_rmmap_locked(dev, r_list->map); - r_list = NULL; + if (!(r_list->map->flags & _DRM_DRIVER)) { + drm_rmmap_locked(dev, r_list->map); + r_list = NULL; + } } if (drm_core_check_feature(dev, DRIVER_DMA_QUEUE) && dev->queuelist) { |