aboutsummaryrefslogtreecommitdiff
path: root/shared-core/nouveau_state.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_state.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_state.c')
-rw-r--r--shared-core/nouveau_state.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index a26ecea3..b6459957 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -383,11 +383,11 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
struct drm_nouveau_private *dev_priv;
if (flags==NV_UNKNOWN)
- return DRM_ERR(EINVAL);
+ return -EINVAL;
dev_priv = drm_calloc(1, sizeof(*dev_priv), DRM_MEM_DRIVER);
if (!dev_priv)
- return DRM_ERR(ENOMEM);
+ return -ENOMEM;
dev_priv->card_type=flags&NOUVEAU_FAMILY;
dev_priv->flags=flags&NOUVEAU_FLAGS;
@@ -463,7 +463,7 @@ int nouveau_ioctl_getparam(DRM_IOCTL_ARGS)
else
{
DRM_ERROR("Requested PCIGART address, while no PCIGART was created\n");
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
break;
case NOUVEAU_GETPARAM_FB_SIZE:
@@ -474,7 +474,7 @@ int nouveau_ioctl_getparam(DRM_IOCTL_ARGS)
break;
default:
DRM_ERROR("unknown parameter %lld\n", getparam.param);
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
DRM_COPY_TO_USER_IOCTL((struct drm_nouveau_getparam __user *)data,
@@ -503,7 +503,7 @@ int nouveau_ioctl_setparam(DRM_IOCTL_ARGS)
default:
DRM_ERROR("invalid CMDBUF_LOCATION value=%lld\n",
setparam.value);
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
dev_priv->config.cmdbuf.location = setparam.value;
break;
@@ -512,7 +512,7 @@ int nouveau_ioctl_setparam(DRM_IOCTL_ARGS)
break;
default:
DRM_ERROR("unknown parameter %lld\n", setparam.param);
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
return 0;