From 900a25b95b04a5688ca74a4f2bbc930cc9b8bac2 Mon Sep 17 00:00:00 2001 From: obrien Date: Wed, 3 Mar 2004 06:20:36 +0000 Subject: Use a long as the opaque type so that it matches the size of a pointer on both 32-bit and 64-bit platforms. --- sys/dev/drm/radeon_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/drm/radeon_state.c') diff --git a/sys/dev/drm/radeon_state.c b/sys/dev/drm/radeon_state.c index eb3cf20..8f61005 100644 --- a/sys/dev/drm/radeon_state.c +++ b/sys/dev/drm/radeon_state.c @@ -2400,7 +2400,7 @@ int radeon_cp_getparam( DRM_IOCTL_ARGS ) break; case RADEON_PARAM_SAREA_HANDLE: /* The lock is the first dword in the sarea. */ - value = (int)dev->lock.hw_lock; + value = (long)dev->lock.hw_lock; break; case RADEON_PARAM_GART_TEX_HANDLE: value = dev_priv->gart_textures_offset; @@ -2409,7 +2409,7 @@ int radeon_cp_getparam( DRM_IOCTL_ARGS ) return DRM_ERR(EINVAL); } - if ( DRM_COPY_TO_USER( param.value, &value, sizeof(int) ) ) { + if ( DRM_COPY_TO_USER( param.value, &value, sizeof(&value) ) ) { DRM_ERROR( "copy_to_user\n" ); return DRM_ERR(EFAULT); } -- cgit v1.1