aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/radeon_irq.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-08-25 05:22:43 -0400
committerDave Airlie <airlied@optimus.(none)>2007-10-14 20:38:19 -0400
commit20caafa6ecb2487d9b223aa33e7cc704f912a758 (patch)
tree7df033fdee81305dad0a67ceba79f51ead7c1b8b /drivers/char/drm/radeon_irq.c
parent23fd50450a34f2558070ceabb0bfebc1c9604af5 (diff)
drm: 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 f shared code to *BSD code. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/radeon_irq.c')
-rw-r--r--drivers/char/drm/radeon_irq.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c
index ad8a0ac7182e..88d19a2e85c0 100644
--- a/drivers/char/drm/radeon_irq.c
+++ b/drivers/char/drm/radeon_irq.c
@@ -155,7 +155,7 @@ int radeon_driver_vblank_do_wait(struct drm_device * dev, unsigned int *sequence
155 atomic_t *counter; 155 atomic_t *counter;
156 if (!dev_priv) { 156 if (!dev_priv) {
157 DRM_ERROR("%s called with no initialization\n", __FUNCTION__); 157 DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
158 return DRM_ERR(EINVAL); 158 return -EINVAL;
159 } 159 }
160 160
161 if (crtc == DRM_RADEON_VBLANK_CRTC1) { 161 if (crtc == DRM_RADEON_VBLANK_CRTC1) {
@@ -165,7 +165,7 @@ int radeon_driver_vblank_do_wait(struct drm_device * dev, unsigned int *sequence
165 counter = &dev->vbl_received2; 165 counter = &dev->vbl_received2;
166 ack |= RADEON_CRTC2_VBLANK_STAT; 166 ack |= RADEON_CRTC2_VBLANK_STAT;
167 } else 167 } else
168 return DRM_ERR(EINVAL); 168 return -EINVAL;
169 169
170 radeon_acknowledge_irqs(dev_priv, ack); 170 radeon_acknowledge_irqs(dev_priv, ack);
171 171
@@ -207,7 +207,7 @@ int radeon_irq_emit(DRM_IOCTL_ARGS)
207 207
208 if (!dev_priv) { 208 if (!dev_priv) {
209 DRM_ERROR("%s called with no initialization\n", __FUNCTION__); 209 DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
210 return DRM_ERR(EINVAL); 210 return -EINVAL;
211 } 211 }
212 212
213 DRM_COPY_FROM_USER_IOCTL(emit, (drm_radeon_irq_emit_t __user *) data, 213 DRM_COPY_FROM_USER_IOCTL(emit, (drm_radeon_irq_emit_t __user *) data,
@@ -217,7 +217,7 @@ int radeon_irq_emit(DRM_IOCTL_ARGS)
217 217
218 if (DRM_COPY_TO_USER(emit.irq_seq, &result, sizeof(int))) { 218 if (DRM_COPY_TO_USER(emit.irq_seq, &result, sizeof(int))) {
219 DRM_ERROR("copy_to_user\n"); 219 DRM_ERROR("copy_to_user\n");
220 return DRM_ERR(EFAULT); 220 return -EFAULT;
221 } 221 }
222 222
223 return 0; 223 return 0;
@@ -233,7 +233,7 @@ int radeon_irq_wait(DRM_IOCTL_ARGS)
233 233
234 if (!dev_priv) { 234 if (!dev_priv) {
235 DRM_ERROR("%s called with no initialization\n", __FUNCTION__); 235 DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
236 return DRM_ERR(EINVAL); 236 return -EINVAL;
237 } 237 }
238 238
239 DRM_COPY_FROM_USER_IOCTL(irqwait, (drm_radeon_irq_wait_t __user *) data, 239 DRM_COPY_FROM_USER_IOCTL(irqwait, (drm_radeon_irq_wait_t __user *) data,
@@ -320,7 +320,7 @@ int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value)
320 drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; 320 drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private;
321 if (value & ~(DRM_RADEON_VBLANK_CRTC1 | DRM_RADEON_VBLANK_CRTC2)) { 321 if (value & ~(DRM_RADEON_VBLANK_CRTC1 | DRM_RADEON_VBLANK_CRTC2)) {
322 DRM_ERROR("called with invalid crtc 0x%x\n", (unsigned int)value); 322 DRM_ERROR("called with invalid crtc 0x%x\n", (unsigned int)value);
323 return DRM_ERR(EINVAL); 323 return -EINVAL;
324 } 324 }
325 dev_priv->vblank_crtc = (unsigned int)value; 325 dev_priv->vblank_crtc = (unsigned int)value;
326 radeon_enable_interrupt(dev); 326 radeon_enable_interrupt(dev);