Module Name: src
Committed By: riastradh
Date: Wed Jul 24 02:06:04 UTC 2013
Modified Files:
src/sys/external/bsd/drm2/dist/drm [riastradh-drm2]: drm_bufs.c
Log Message:
Replace ioremap/iounmap by drm_ioremap/drm_iounmap in drm_bufs.c.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.6 -r1.1.1.1.2.7 \
src/sys/external/bsd/drm2/dist/drm/drm_bufs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/dist/drm/drm_bufs.c
diff -u src/sys/external/bsd/drm2/dist/drm/drm_bufs.c:1.1.1.1.2.6 src/sys/external/bsd/drm2/dist/drm/drm_bufs.c:1.1.1.1.2.7
--- src/sys/external/bsd/drm2/dist/drm/drm_bufs.c:1.1.1.1.2.6 Wed Jul 24 02:05:17 2013
+++ src/sys/external/bsd/drm2/dist/drm/drm_bufs.c Wed Jul 24 02:06:04 2013
@@ -211,7 +211,11 @@ static int drm_addmap_core(struct drm_de
}
}
if (map->type == _DRM_REGISTERS) {
+#ifdef __NetBSD__
+ map->handle = drm_ioremap(dev, map);
+#else
map->handle = ioremap(map->offset, map->size);
+#endif
if (!map->handle) {
kfree(map);
return -ENOMEM;
@@ -337,7 +341,11 @@ static int drm_addmap_core(struct drm_de
list = kzalloc(sizeof(*list), GFP_KERNEL);
if (!list) {
if (map->type == _DRM_REGISTERS)
+#ifdef __NetBSD__
+ drm_iounmap(dev, map);
+#else
iounmap(map->handle);
+#endif
kfree(map);
return -EINVAL;
}
@@ -354,7 +362,11 @@ static int drm_addmap_core(struct drm_de
(map->type == _DRM_SHM));
if (ret) {
if (map->type == _DRM_REGISTERS)
+#ifdef __NetBSD__
+ drm_iounmap(dev, map);
+#else
iounmap(map->handle);
+#endif
kfree(map);
kfree(list);
mutex_unlock(&dev->struct_mutex);
@@ -452,7 +464,11 @@ int drm_rmmap_locked(struct drm_device *
switch (map->type) {
case _DRM_REGISTERS:
+#ifdef __NetBSD__
+ drm_iounmap(dev, map);
+#else
iounmap(map->handle);
+#endif
/* FALLTHROUGH */
case _DRM_FRAME_BUFFER:
if (drm_core_has_MTRR(dev) && map->mtrr >= 0) {