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)
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>

No differences found