diff options
author | Eric Anholt <eric@anholt.net> | 2007-07-19 17:00:17 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-07-20 12:53:52 -0700 |
commit | e39286eb5eab8846a228863abf8f1b8b07a9e29d (patch) | |
tree | 7f0f599e514917546e195f2ec19eb869deb141c1 /shared-core/nouveau_fifo.c | |
parent | 5dc9fd96d7bf48003db832f145ad8acb4bcb73b4 (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_fifo.c')
-rw-r--r-- | shared-core/nouveau_fifo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shared-core/nouveau_fifo.c b/shared-core/nouveau_fifo.c index 230c8298..e3a6674d 100644 --- a/shared-core/nouveau_fifo.c +++ b/shared-core/nouveau_fifo.c @@ -207,7 +207,7 @@ nouveau_fifo_cmdbuf_alloc(struct drm_device *dev, int channel) (DRMFILE)-2); if (!cb) { DRM_ERROR("Couldn't allocate DMA command buffer.\n"); - return DRM_ERR(ENOMEM); + return -ENOMEM; } if (cb->flags & NOUVEAU_MEM_AGP) { @@ -289,13 +289,13 @@ int nouveau_fifo_alloc(struct drm_device *dev, int *chan_ret, DRMFILE filp, } /* no more fifos. you lost. */ if (channel==nouveau_fifo_number(dev)) - return DRM_ERR(EINVAL); + return -EINVAL; (*chan_ret) = channel; dev_priv->fifos[channel] = drm_calloc(1, sizeof(struct nouveau_fifo), DRM_MEM_DRIVER); if (!dev_priv->fifos[channel]) - return DRM_ERR(ENOMEM); + return -ENOMEM; dev_priv->fifo_alloc_count++; chan = dev_priv->fifos[channel]; chan->filp = filp; @@ -483,7 +483,7 @@ static int nouveau_ioctl_fifo_alloc(DRM_IOCTL_ARGS) sizeof(init)); if (init.fb_ctxdma_handle == ~0 || init.tt_ctxdma_handle == ~0) - return DRM_ERR(EINVAL); + return -EINVAL; res = nouveau_fifo_alloc(dev, &init.channel, filp, init.fb_ctxdma_handle, @@ -511,7 +511,7 @@ static int nouveau_ioctl_fifo_alloc(DRM_IOCTL_ARGS) entry = drm_find_matching_map(dev, chan->regs); if (!entry) - return DRM_ERR(EINVAL); + return -EINVAL; init.ctrl = entry->user_token; /* pass back FIFO map info to the caller */ |