drm/i915: Add to_user_ptr()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 22 Feb 2013 14:12:51 +0000 (16:12 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 3 Mar 2013 18:49:11 +0000 (19:49 +0100)
commit2bb4629add2e648f1822872cce72f0fe163ce605
tree019ee35e089baacdefa33211798825fa3ea5953c
parent83f377abed03e46eb3b6ce14a91291e7cdf86647
drm/i915: Add to_user_ptr()

to_user_ptr() simply casts a pointer passed as u64 from user space
to void __user * correctly. Using this lets us get rid of all the
tiresome casts.

The idea came from Chris Wilson <chris@chris-wilson.co.uk>.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c