diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-01-08 10:55:49 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-01-08 11:47:15 +1100 |
commit | b147c3926352e4dcb9dbf53b8b12baae8ce34254 (patch) | |
tree | 316d68cf36371c70918c675d38c803614f1a7bab /linux-core/drm_bufs.c | |
parent | fe5770b89e57c669a946dea86a58b17387bf9cf4 (diff) |
drm: remove drm_follow_page, and drm_ioremap and ioremapfree
This comes from the Re: [patch] paravirt: isolate module ops on lkml
It needs some testing, please report any regressions caused.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'linux-core/drm_bufs.c')
-rw-r--r-- | linux-core/drm_bufs.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c index 1ff191ad..8793ba0e 100644 --- a/linux-core/drm_bufs.c +++ b/linux-core/drm_bufs.c @@ -179,7 +179,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset, } } if (map->type == _DRM_REGISTERS) - map->handle = drm_ioremap(map->offset, map->size, dev); + map->handle = ioremap(map->offset, map->size); break; case _DRM_SHM: list = drm_find_matching_map(dev, map); @@ -279,6 +279,8 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset, list = drm_alloc(sizeof(*list), DRM_MEM_MAPS); if (!list) { + if (map->type == _DRM_REGISTERS) + iounmap(map->handle); drm_free(map, sizeof(*map), DRM_MEM_MAPS); return -EINVAL; } @@ -295,6 +297,8 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset, ret = drm_map_handle(dev, &list->hash, user_token, 0); if (ret) { + if (map->type == _DRM_REGISTERS) + iounmap(map->handle); drm_free(map, sizeof(*map), DRM_MEM_MAPS); drm_free(list, sizeof(*list), DRM_MEM_MAPS); mutex_unlock(&dev->struct_mutex); @@ -402,7 +406,7 @@ int drm_rmmap_locked(drm_device_t *dev, drm_local_map_t *map) switch (map->type) { case _DRM_REGISTERS: - drm_ioremapfree(map->handle, map->size, dev); + iounmap(map->handle); /* FALLTHROUGH */ case _DRM_FRAME_BUFFER: if (drm_core_has_MTRR(dev) && map->mtrr >= 0) { |