Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67e1a014 authored by Dave Airlie's avatar Dave Airlie Committed by Dave Airlie
Browse files

drm: fix warning on 64-bit platforms..



This looks ugly, but it is the only thing that makes sense that doesn't
change the API.

Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 5fb4dc9b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -309,7 +309,9 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,

	if (copy_to_user(argp, maplist->map, sizeof(drm_map_t)))
		return -EFAULT;
	if (put_user((void *)maplist->user_token, &argp->handle))

	/* avoid a warning on 64-bit, this casting isn't very nice, but the API is set so too late */
	if (put_user((void *)(unsigned long)maplist->user_token, &argp->handle))
		return -EFAULT;
	return 0;
}