summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@openbsd.org>2013-06-26 22:51:09 +0200
committerJonathan Gray <jsg@jsg.id.au>2013-08-12 10:43:06 +1000
commit89e10dfbb9b68a3ae7c57a5ab3d91da7c4e37a80 (patch)
treecfd61b23c846bd9b529f43efa10d634e04fa5a0d
parenta33b13abab095ade8d9e0961cdcc9f5704c3d3da (diff)
convert between Linux-style negative errno values and OpenBSD errno values
on the interface between the generic drm ioctl code and the radeon-specific ioctl code
-rw-r--r--sys/dev/pci/drm/radeon/radeon_kms.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_kms.c b/sys/dev/pci/drm/radeon/radeon_kms.c
index 238cb6ba82e..ac75fb02534 100644
--- a/sys/dev/pci/drm/radeon/radeon_kms.c
+++ b/sys/dev/pci/drm/radeon/radeon_kms.c
@@ -69,6 +69,7 @@ void radeon_set_filp_rights(struct drm_device *, struct drm_file **,
struct drm_file *, uint32_t *);
int radeondrm_ioctl_kms(struct drm_device *, u_long, caddr_t, struct drm_file *);
+int radeon_ioctl_kms(struct drm_device *, u_long, caddr_t, struct drm_file *);
int radeon_dma_ioctl_kms(struct drm_device *, struct drm_dma *, struct drm_file *);
int radeon_cp_init_kms(struct drm_device *, void *, struct drm_file *);
@@ -2264,6 +2265,13 @@ int
radeondrm_ioctl_kms(struct drm_device *dev, u_long cmd, caddr_t data,
struct drm_file *file_priv)
{
+ return -(radeon_ioctl_kms(dev, cmd, data, file_priv));
+}
+
+int
+radeon_ioctl_kms(struct drm_device *dev, u_long cmd, caddr_t data,
+ struct drm_file *file_priv)
+{
if (file_priv->authenticated == 1) {
switch (cmd) {
case DRM_IOCTL_RADEON_CP_IDLE:
@@ -2354,5 +2362,5 @@ radeondrm_ioctl_kms(struct drm_device *dev, u_long cmd, caddr_t data,
return (radeon_mem_init_heap_kms(dev, data, file_priv));
}
}
- return (EINVAL);
+ return -EINVAL;
}