summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_notifier.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-07-19 17:00:17 -0700
committerEric Anholt <eric@anholt.net>2007-07-20 12:53:52 -0700
commite39286eb5eab8846a228863abf8f1b8b07a9e29d (patch)
tree7f0f599e514917546e195f2ec19eb869deb141c1 /shared-core/nouveau_notifier.c
parent5dc9fd96d7bf48003db832f145ad8acb4bcb73b4 (diff)
Remove DRM_ERR OS macro.
This was used to make all ioctl handlers return -errno on linux and errno on *BSD. Instead, just return -errno in shared code, and flip sign on return from shared code to *BSD code.
Diffstat (limited to 'shared-core/nouveau_notifier.c')
-rw-r--r--shared-core/nouveau_notifier.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/shared-core/nouveau_notifier.c b/shared-core/nouveau_notifier.c
index 238e3c8b..425e471c 100644
--- a/shared-core/nouveau_notifier.c
+++ b/shared-core/nouveau_notifier.c
@@ -46,7 +46,7 @@ nouveau_notifier_init_channel(struct drm_device *dev, int channel, DRMFILE filp)
chan->notifier_block = nouveau_mem_alloc(dev, 0, PAGE_SIZE, flags,filp);
if (!chan->notifier_block)
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
ret = nouveau_mem_init_heap(&chan->notifier_heap,
0, chan->notifier_block->size);
@@ -84,13 +84,13 @@ nouveau_notifier_alloc(struct drm_device *dev, int channel, uint32_t handle,
if (!chan->notifier_heap) {
DRM_ERROR("Channel %d doesn't have a notifier heap!\n",
channel);
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
mem = nouveau_mem_alloc_block(chan->notifier_heap, 32, 0, chan->filp);
if (!mem) {
DRM_ERROR("Channel %d notifier block full\n", channel);
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
}
mem->flags = NOUVEAU_MEM_NOTIFIER;
@@ -102,7 +102,7 @@ nouveau_notifier_alloc(struct drm_device *dev, int channel, uint32_t handle,
} else {
DRM_ERROR("Bad DMA target, flags 0x%08x!\n",
chan->notifier_block->flags);
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
if ((ret = nouveau_gpuobj_dma_new(dev, channel, NV_CLASS_DMA_IN_MEMORY,
@@ -138,7 +138,7 @@ nouveau_ioctl_notifier_alloc(DRM_IOCTL_ARGS)
if (!nouveau_fifo_owner(dev, filp, na.channel)) {
DRM_ERROR("pid %d doesn't own channel %d\n",
DRM_CURRENTPID, na.channel);
- return DRM_ERR(EPERM);
+ return -EPERM;
}
ret = nouveau_notifier_alloc(dev, na.channel, na.handle,